parent
9a2ccb2071
commit
b882c366c3
@ -1,7 +1,3 @@
|
||||
DIST rsyslog-5.10.1.tar.gz 2390048 SHA256 2f643a2c613d5b09f242affd32a90cf4fb7a9ac4557dc80f218e6f3e5affb4c8 SHA512 5f70e97c60103c1f3198cd04cb1fb402d67c2e0232ff09c0aa0cd578667924e0a77a34529bcf4f530c0ef5b8da4f42b98bd5be029d1c2669dd04003e59c1b092 WHIRLPOOL 3f14b25dfca61bdcbdc954f0cd54f5e71481a8ebcbfbd45abceafac9185a51dfd67990e936dd3368c9944aabc9653435fbefc270aabcf925e1a2afda9d09e7ea
|
||||
DIST rsyslog-5.8.11.tar.gz 2393222 SHA256 f75b39cf22506f7a28d986d0a446a09a0806f253dba661f125a241a1b47d6285 SHA512 545db333efd136c2ae26131ad400e69f41aaa4fa458a5d586c73e9063f0acb044dbcfe3a13e48b3db77a72f471e87b3b8f9ab2bff008b1166b836dbdddb7974a WHIRLPOOL 2ab8ae35179dcade3953c612cb8bdbd48e7bce6c0cca54278d2949ff3c7c29311341855778511acc38328db4ebeca5599e632c94def038f7134cdd2df78e53e8
|
||||
DIST rsyslog-5.8.12.tar.gz 2393679 SHA256 18a408c92fa299773d26a8d6f324eec66282a148b0989c66d94b94318dd0a514 SHA512 18080b09a5e80d3a2dc4b04976c3470eb096560ebc038815dfaec73ef3e53ffbad74b2586d0247aeb318a6e2463e072fe84dad5a2040a9320f37b55511d890ae WHIRLPOOL 80b429beb88014c862fc74f0b9ff0b78bd54764b3c01a4b3f7595d4863eb2f8996d29e9db70b472c30c7cac02793a5290319f51b6eaab4b28dea4ca16246c030
|
||||
DIST rsyslog-6.6.0.tar.gz 2672981 SHA256 80aabccf5945d7e26152a2ad29100e147d1fecb300397dc4ccda41acaf2ec33d SHA512 3f244e9dbde136cebb7b41534af5ab795f7c2ea6e9adf207b9a50547bc0f303b535dfd0a8a62cefcfca02554fcea0a2d4f22f134d39e313abf1ca0b5252b9ecd WHIRLPOOL f2800cb6ba499c3ea904d1b6c5ceafa8a2aeff79f92dfc37f35762dec4a1f7583f0285317800a393153ef56dd81bc0609441132d899eff7e44e6d442bec2f737
|
||||
DIST rsyslog-7.2.7.tar.gz 2761741 SHA256 4833533a140c1aebed069082ad579ac25e488b647d4d508167dc6e4de75af96d SHA512 4489de8f0fa63d2c9296695faacb653b43ee7a779fcc29bcb8ce0ca0442554b832e3d491248d15a6f3d9b6982cfcc669cfae750fccb58c52ad847c3a7df94e3c WHIRLPOOL d59a433c82153ad52297b05dc2422e20d90b2398f6cf4e11f0408b8565ace7d559bf80fc8e2f5fc086a693311f97ed09a5c004cd356d210c14aef9bd848d00f1
|
||||
DIST rsyslog-7.4.3.tar.gz 2908523 SHA256 d96fcb733452177f5f06789507e06f5c01434d83001c130c9fcdf21e0fffe382 SHA512 bf840b59c4fb6e0978ca55df5ef48cb6898e0c6ec633efce8e148c0d8af5497346c98290df388811b2f94425119dd0bf28dd272418a35f958ed59a3f5946d25a WHIRLPOOL b57acc662e232c27293c2836d5547e0cc7e7902fdd3ed5d2bfcbf85a747ecdb6c984b25da1a38196f485e2473d2de3f5ae8d9d764cdd86778d4bc99b9a3f574d
|
||||
DIST rsyslog-zeromq.tar.gz 22223 SHA256 3cca6ce8722ec5035744a9b88e65b89b35f6b2e6bbdbc9c9bba89d22addd2753 SHA512 d0fd6705d1fbbfd8c2932df281ef30ebfcc83085a62026ffd192bdfefaca5abef415183f958eee4f7421804ca59d8c20d8cf7fbc5b4105f86c297c6fbbcdd760 WHIRLPOOL 17d189dfe12ef5525f103d6ee202cfafe019bca11856da9d206004a9377b682b09d76816e2e2d1ca5aff2394b8cc8baec13f4961d32c74a377a9b6041ff398b1
|
||||
DIST rsyslog-7.4.4.tar.gz 2910075 SHA256 276d094d1e4c62c770ec8a72723667f119eee038912b79cf3337d439bc2f9087 SHA512 cefaa0d5c5e9deb8a6e049a5b6c4503a9f30bfe89324a06f3e8ac6d85334bbddfec9e81010a1821ad5f902347bbc519e92d501783f77bd12f29e216a9abbfc08 WHIRLPOOL 0ba87e3edd7e0eba6ceaeef251d9e29d580452e0305c9df9577769abd53e01345a86de45c0289b945eca3d283838d7cbc4d36eb04ba8105fe3cb754c06a759b9
|
||||
|
@ -1,90 +0,0 @@
|
||||
# rsyslog v5: load input modules
|
||||
# If you do not load inputs, nothing happens!
|
||||
# You may need to set the module load path if modules are not found.
|
||||
|
||||
$ModLoad immark.so # provides --MARK-- message capability
|
||||
$ModLoad imuxsock.so # provides support for local system logging (e.g. via logger command)
|
||||
$ModLoad imklog.so # kernel logging (formerly provided by rklogd)
|
||||
|
||||
# Include configuration files from directory
|
||||
$IncludeConfig /etc/rsyslog.d/*
|
||||
|
||||
# Check config syntax on startup and abort if unclean (default off)
|
||||
#$AbortOnUncleanConfig on
|
||||
|
||||
# Reduce repeating messages (default off)
|
||||
#$RepeatedMsgReduction on
|
||||
|
||||
# Log all kernel messages to the console.
|
||||
# Logging much else clutters up the screen.
|
||||
#kern.* /dev/console
|
||||
|
||||
# Log anything (except mail) of level info or higher.
|
||||
# Don't log private authentication messages!
|
||||
*.info;mail.none;authpriv.none;cron.none -/var/log/messages
|
||||
|
||||
# The authpriv file has restricted access.
|
||||
authpriv.* /var/log/secure
|
||||
|
||||
# Log all the mail messages in one place.
|
||||
mail.* -/var/log/maillog
|
||||
|
||||
# Log cron stuff
|
||||
cron.* -/var/log/cron
|
||||
|
||||
# Everybody gets emergency messages
|
||||
*.emerg *
|
||||
|
||||
# Save news errors of level crit and higher in a special file.
|
||||
uucp,news.crit -/var/log/spooler
|
||||
|
||||
# Save boot messages also to boot.log
|
||||
local7.* /var/log/boot.log
|
||||
|
||||
# More configuration examples:
|
||||
#
|
||||
# Remote Logging (we use TCP for reliable delivery)
|
||||
# An on-disk queue is created for this action. If the remote host is
|
||||
# down, messages are spooled to disk and sent when it is up again.
|
||||
#$WorkDirectory /var/spool/rsyslog # where to place spool files
|
||||
#$ActionQueueFileName uniqName # unique name prefix for spool files
|
||||
#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
|
||||
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
|
||||
#$ActionQueueType LinkedList # run asynchronously
|
||||
#$ActionResumeRetryCount -1 # infinety retries if host is down
|
||||
#$ActionResumeInterval 30 # retry interval
|
||||
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
|
||||
#*.* @@remote-host
|
||||
|
||||
# Remote Logging with TCP + SSL/TLS
|
||||
#$DefaultNetstreamDriver gtls
|
||||
#$DefaultNetstreamDriverCAFile /etc/ssl/rsyslog/rsyslog_ca.cert.pem
|
||||
#$DefaultNetstreamDriverCertFile /etc/ssl/rsyslog/rsyslog_CLIENT.cert.pem
|
||||
#$DefaultNetstreamDriverKeyFile /etc/ssl/rsyslog/rsyslog_CLIENT.key.pem
|
||||
#$ActionSendStreamDriverAuthMode x509/name # enable peer authentication
|
||||
#$ActionSendStreamDriverPermittedPeer foo # authorize to send encrypted data to server foo
|
||||
#$ActionSendStreamDriverMode 1 # run driver in TLS-only mode
|
||||
|
||||
# ######### Receiving Messages from Remote Hosts ##########
|
||||
# TCP Syslog Server:
|
||||
#$ModLoad imtcp # provides TCP syslog reception
|
||||
#$TCPServerRun 10514 # start a TCP syslog server at port 10514
|
||||
|
||||
# TCP + SSL/TLS Syslog Server:
|
||||
#$ModLoad imtcp # provides TCP syslog reception
|
||||
#$DefaultNetstreamDriver gtls # use gnuTLS for data encryption
|
||||
#$DefaultNetstreamDriverCAFile /etc/ssl/rsyslog/rsyslog_ca.cert.pem
|
||||
#$DefaultNetstreamDriverCertFile /etc/ssl/rsyslog/rsyslog_SERVER.cert.pem
|
||||
#$DefaultNetstreamDriverKeyFile /etc/ssl/rsyslog/rsyslog_SERVER.key.pem
|
||||
#$InputTCPServerStreamDriverMode 1 # run driver in TLS-only mode
|
||||
#$InputTCPServerStreamDriverAuthMode x509/name # enable peer authentication
|
||||
#$InputTCPServerStreamDriverPermittedPeer bar # authorize client named bar (one line per client)
|
||||
#$TCPServerRun 10514 # start a TCP syslog server at port 10514
|
||||
|
||||
# UDP Syslog Server:
|
||||
#$ModLoad imudp.so # provides UDP syslog reception
|
||||
#$UDPServerRun 514 # start a UDP syslog server at standard port 514
|
||||
|
||||
# RELP Syslog Server:
|
||||
#$ModLoad imrelp # provides RELP syslog reception
|
||||
#$InputRELPServerRun 10515 # start a RELP syslog server at port 10515
|
@ -1,17 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/5-stable/rsyslog.confd,v 1.1 2010/10/21 07:38:29 dev-zero Exp $
|
||||
|
||||
# Configuration file
|
||||
CONFIGFILE="/etc/rsyslog.conf"
|
||||
|
||||
# PID file
|
||||
PIDFILE="/var/run/rsyslogd.pid"
|
||||
|
||||
# Options to rsyslogd
|
||||
# See rsyslogd(8) for more details
|
||||
# Notes:
|
||||
# * Do not specify another PIDFILE but use the variable above to change the location
|
||||
# * Do not specify another CONFIGFILE but use the variable above to change the location
|
||||
# * "-c5" tells rsyslog to _not_ run in sysklogd compatibility mode
|
||||
RSYSLOG_OPTS="-c5"
|
@ -1,43 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/5-stable/rsyslog.initd,v 1.4 2012/08/24 14:40:14 ultrabug Exp $
|
||||
|
||||
extra_started_commands="reload"
|
||||
|
||||
depend() {
|
||||
provide logger
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting rsyslogd"
|
||||
start-stop-daemon \
|
||||
--start --quiet --exec /usr/sbin/rsyslogd --pidfile "${PIDFILE}" \
|
||||
-- ${RSYSLOG_OPTS} -i "${PIDFILE}" -f "${CONFIGFILE}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping rsyslogd"
|
||||
start-stop-daemon \
|
||||
--stop --quiet \
|
||||
--pidfile "${PIDFILE}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
reload() {
|
||||
if [ ! -f "${PIDFILE}" ]; then
|
||||
eerror "rsyslogd not running"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Baselayout-1 users still use --stop and --oknodo
|
||||
local USEROPT="--name rsyslogd"
|
||||
if [ ! -f /etc/init.d/sysfs ]; then
|
||||
USEROPT="--stop --oknodo"
|
||||
fi
|
||||
|
||||
ebegin "Re-opening rsyslogd log files"
|
||||
start-stop-daemon --signal HUP --pidfile "${PIDFILE}" ${USEROPT}
|
||||
eend $?
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/5-stable/rsyslog.logrotate,v 1.1 2010/10/21 07:38:29 dev-zero Exp $
|
||||
/var/log/messages /var/log/secure /var/log/maillog /var/log/cron /var/log/spooler /var/log/boot.log {
|
||||
sharedscripts
|
||||
postrotate
|
||||
/etc/init.d/rsyslog reload &>/dev/null || true
|
||||
endscript
|
||||
}
|
@ -1,90 +0,0 @@
|
||||
# rsyslog v5: load input modules
|
||||
# If you do not load inputs, nothing happens!
|
||||
# You may need to set the module load path if modules are not found.
|
||||
|
||||
$ModLoad immark.so # provides --MARK-- message capability
|
||||
$ModLoad imuxsock.so # provides support for local system logging (e.g. via logger command)
|
||||
$ModLoad imklog.so # kernel logging (formerly provided by rklogd)
|
||||
|
||||
# Include configuration files from directory
|
||||
$IncludeConfig /etc/rsyslog.d/*
|
||||
|
||||
# Check config syntax on startup and abort if unclean (default off)
|
||||
#$AbortOnUncleanConfig on
|
||||
|
||||
# Reduce repeating messages (default off)
|
||||
#$RepeatedMsgReduction on
|
||||
|
||||
# Log all kernel messages to the console.
|
||||
# Logging much else clutters up the screen.
|
||||
#kern.* /dev/console
|
||||
|
||||
# Log anything (except mail) of level info or higher.
|
||||
# Don't log private authentication messages!
|
||||
*.info;mail.none;authpriv.none;cron.none -/var/log/messages
|
||||
|
||||
# The authpriv file has restricted access.
|
||||
authpriv.* /var/log/secure
|
||||
|
||||
# Log all the mail messages in one place.
|
||||
mail.* -/var/log/maillog
|
||||
|
||||
# Log cron stuff
|
||||
cron.* -/var/log/cron
|
||||
|
||||
# Everybody gets emergency messages
|
||||
*.emerg :omusrmsg:*
|
||||
|
||||
# Save news errors of level crit and higher in a special file.
|
||||
uucp,news.crit -/var/log/spooler
|
||||
|
||||
# Save boot messages also to boot.log
|
||||
local7.* /var/log/boot.log
|
||||
|
||||
# More configuration examples:
|
||||
#
|
||||
# Remote Logging (we use TCP for reliable delivery)
|
||||
# An on-disk queue is created for this action. If the remote host is
|
||||
# down, messages are spooled to disk and sent when it is up again.
|
||||
#$WorkDirectory /var/spool/rsyslog # where to place spool files
|
||||
#$ActionQueueFileName uniqName # unique name prefix for spool files
|
||||
#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
|
||||
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
|
||||
#$ActionQueueType LinkedList # run asynchronously
|
||||
#$ActionResumeRetryCount -1 # infinety retries if host is down
|
||||
#$ActionResumeInterval 30 # retry interval
|
||||
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
|
||||
#*.* @@remote-host
|
||||
|
||||
# Remote Logging with TCP + SSL/TLS
|
||||
#$DefaultNetstreamDriver gtls
|
||||
#$DefaultNetstreamDriverCAFile /etc/ssl/rsyslog/rsyslog_ca.cert.pem
|
||||
#$DefaultNetstreamDriverCertFile /etc/ssl/rsyslog/rsyslog_CLIENT.cert.pem
|
||||
#$DefaultNetstreamDriverKeyFile /etc/ssl/rsyslog/rsyslog_CLIENT.key.pem
|
||||
#$ActionSendStreamDriverAuthMode x509/name # enable peer authentication
|
||||
#$ActionSendStreamDriverPermittedPeer foo # authorize to send encrypted data to server foo
|
||||
#$ActionSendStreamDriverMode 1 # run driver in TLS-only mode
|
||||
|
||||
# ######### Receiving Messages from Remote Hosts ##########
|
||||
# TCP Syslog Server:
|
||||
#$ModLoad imtcp # provides TCP syslog reception
|
||||
#$TCPServerRun 10514 # start a TCP syslog server at port 10514
|
||||
|
||||
# TCP + SSL/TLS Syslog Server:
|
||||
#$ModLoad imtcp # provides TCP syslog reception
|
||||
#$DefaultNetstreamDriver gtls # use gnuTLS for data encryption
|
||||
#$DefaultNetstreamDriverCAFile /etc/ssl/rsyslog/rsyslog_ca.cert.pem
|
||||
#$DefaultNetstreamDriverCertFile /etc/ssl/rsyslog/rsyslog_SERVER.cert.pem
|
||||
#$DefaultNetstreamDriverKeyFile /etc/ssl/rsyslog/rsyslog_SERVER.key.pem
|
||||
#$InputTCPServerStreamDriverMode 1 # run driver in TLS-only mode
|
||||
#$InputTCPServerStreamDriverAuthMode x509/name # enable peer authentication
|
||||
#$InputTCPServerStreamDriverPermittedPeer bar # authorize client named bar (one line per client)
|
||||
#$TCPServerRun 10514 # start a TCP syslog server at port 10514
|
||||
|
||||
# UDP Syslog Server:
|
||||
#$ModLoad imudp.so # provides UDP syslog reception
|
||||
#$UDPServerRun 514 # start a UDP syslog server at standard port 514
|
||||
|
||||
# RELP Syslog Server:
|
||||
#$ModLoad imrelp # provides RELP syslog reception
|
||||
#$InputRELPServerRun 10515 # start a RELP syslog server at port 10515
|
@ -1,17 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/6-stable/rsyslog.confd,v 1.1 2012/06/01 12:54:17 ultrabug Exp $
|
||||
|
||||
# Configuration file
|
||||
CONFIGFILE="/etc/rsyslog.conf"
|
||||
|
||||
# PID file
|
||||
PIDFILE="/var/run/rsyslogd.pid"
|
||||
|
||||
# Options to rsyslogd
|
||||
# See rsyslogd(8) for more details
|
||||
# Notes:
|
||||
# * Do not specify another PIDFILE but use the variable above to change the location
|
||||
# * Do not specify another CONFIGFILE but use the variable above to change the location
|
||||
# * "-c5" tells rsyslog to _not_ run in sysklogd compatibility mode
|
||||
RSYSLOG_OPTS="-c5"
|
@ -1,43 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/6-stable/rsyslog.initd,v 1.2 2012/08/24 14:40:14 ultrabug Exp $
|
||||
|
||||
extra_started_commands="reload"
|
||||
|
||||
depend() {
|
||||
provide logger
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting rsyslogd"
|
||||
start-stop-daemon \
|
||||
--start --quiet --exec /usr/sbin/rsyslogd --pidfile "${PIDFILE}" \
|
||||
-- ${RSYSLOG_OPTS} -i "${PIDFILE}" -f "${CONFIGFILE}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping rsyslogd"
|
||||
start-stop-daemon \
|
||||
--stop --quiet \
|
||||
--pidfile "${PIDFILE}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
reload() {
|
||||
if [ ! -f "${PIDFILE}" ]; then
|
||||
eerror "rsyslogd not running"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Baselayout-1 users still use --stop and --oknodo
|
||||
local USEROPT="--name rsyslogd"
|
||||
if [ ! -f /etc/init.d/sysfs ]; then
|
||||
USEROPT="--stop --oknodo"
|
||||
fi
|
||||
|
||||
ebegin "Re-opening rsyslogd log files"
|
||||
start-stop-daemon --signal HUP --pidfile "${PIDFILE}" ${USEROPT}
|
||||
eend $?
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/6-stable/rsyslog.logrotate,v 1.1 2012/06/01 12:54:17 ultrabug Exp $
|
||||
/var/log/messages /var/log/secure /var/log/maillog /var/log/cron /var/log/spooler /var/log/boot.log {
|
||||
sharedscripts
|
||||
postrotate
|
||||
/etc/init.d/rsyslog reload &>/dev/null || true
|
||||
endscript
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
--- a/Makefile.am 2012-06-01 12:54:30.118114106 +0200
|
||||
+++ b/Makefile.am 2012-06-01 12:56:30.949078827 +0200
|
||||
@@ -198,6 +198,14 @@
|
||||
SUBDIRS += plugins/omprog
|
||||
endif
|
||||
|
||||
+if ENABLE_IMZEROMQ
|
||||
+SUBDIRS += plugins/imzeromq
|
||||
+endif
|
||||
+
|
||||
+if ENABLE_OMZEROMQ
|
||||
+SUBDIRS += plugins/omzeromq
|
||||
+endif
|
||||
+
|
||||
if ENABLE_RFC3195
|
||||
SUBDIRS += plugins/im3195
|
||||
endif
|
||||
@@ -242,6 +250,8 @@
|
||||
--enable-pmlastmsg \
|
||||
--enable-omruleset \
|
||||
--enable-omprog \
|
||||
+ --enable-imzeromq \
|
||||
+ --enable-omzeromq \
|
||||
--enable-imdiag \
|
||||
--enable-imptcp \
|
||||
--enable-imttcp \
|
||||
--- a/configure.ac 2012-06-01 12:54:30.118114106 +0200
|
||||
+++ b/configure.ac 2012-06-01 12:59:14.250380620 +0200
|
||||
@@ -884,6 +884,17 @@
|
||||
)
|
||||
AM_CONDITIONAL(ENABLE_IMFILE, test x$enable_imfile = xyes)
|
||||
|
||||
+# settings for the ZeroMQ input module
|
||||
+AC_ARG_ENABLE(imzeromq,
|
||||
+ [AS_HELP_STRING([--enable-imzeromq],[file input module enabled @<:@default=no@:>@])],
|
||||
+ [case "${enableval}" in
|
||||
+ yes) enable_imzeromq="yes" ;;
|
||||
+ no) enable_imzeromq="no" ;;
|
||||
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-imzeromq) ;;
|
||||
+ esac],
|
||||
+ [enable_imzeromq=no]
|
||||
+)
|
||||
+AM_CONDITIONAL(ENABLE_IMZEROMQ, test x$enable_imzeromq = xyes)
|
||||
|
||||
# settings for the door input module (under solaris, thus default off)
|
||||
AC_ARG_ENABLE(imsolaris,
|
||||
@@ -948,6 +959,17 @@
|
||||
)
|
||||
AM_CONDITIONAL(ENABLE_OMPROG, test x$enable_omprog = xyes)
|
||||
|
||||
+# settings for the omzeromq output module
|
||||
+AC_ARG_ENABLE(omzeromq,
|
||||
+ [AS_HELP_STRING([--enable-omzeromq],[Compiles omzeromq module @<:@default=no@:>@])],
|
||||
+ [case "${enableval}" in
|
||||
+ yes) enable_omzeromq="yes" ;;
|
||||
+ no) enable_omzeromq="no" ;;
|
||||
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-omzeromq) ;;
|
||||
+ esac],
|
||||
+ [enable_omzeromq=no]
|
||||
+)
|
||||
+AM_CONDITIONAL(ENABLE_OMZEROMQ, test x$enable_omzeromq = xyes)
|
||||
|
||||
# settings for omudpspoof
|
||||
AC_ARG_ENABLE(omudpspoof,
|
||||
@@ -1251,6 +1273,7 @@
|
||||
plugins/omtemplate/Makefile \
|
||||
plugins/omhdfs/Makefile \
|
||||
plugins/omprog/Makefile \
|
||||
+ plugins/omzeromq/Makefile \
|
||||
plugins/omstdout/Makefile \
|
||||
plugins/pmrfc3164sd/Makefile \
|
||||
plugins/pmlastmsg/Makefile \
|
||||
@@ -1261,6 +1284,7 @@
|
||||
plugins/omdbalerting/Makefile \
|
||||
plugins/omuxsock/Makefile \
|
||||
plugins/imfile/Makefile \
|
||||
+ plugins/imzeromq/Makefile \
|
||||
plugins/imsolaris/Makefile \
|
||||
plugins/imptcp/Makefile \
|
||||
plugins/imttcp/Makefile \
|
||||
@@ -1304,6 +1328,7 @@
|
||||
echo " threaded plain tcp input module enabled: $enable_imttcp"
|
||||
echo " imdiag enabled: $enable_imdiag"
|
||||
echo " file input module enabled: $enable_imfile"
|
||||
+echo " ZeroMQ input module enabled: $enable_imzeromq"
|
||||
echo " Solaris input module enabled: $enable_imsolaris"
|
||||
echo " periodic statistics module enabled: $enable_impstats"
|
||||
echo " input template module will be compiled: $enable_imtemplate"
|
||||
@@ -1311,6 +1336,7 @@
|
||||
echo "---{ output plugins }---"
|
||||
echo " Mail support enabled: $enable_mail"
|
||||
echo " omprog module will be compiled: $enable_omprog"
|
||||
+echo " omzeromq module will be compiled: $enable_omzeromq"
|
||||
echo " output mongodb module will be compiled: $enable_ommongodb"
|
||||
echo " omstdout module will be compiled: $enable_omstdout"
|
||||
echo " omhdfs module will be compiled: $enable_omhdfs"
|
@ -1,254 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/rsyslog-5.10.1.ebuild,v 1.1 2012/11/20 13:03:37 ultrabug Exp $
|
||||
|
||||
EAPI=4
|
||||
AUTOTOOLS_AUTORECONF=yes
|
||||
|
||||
inherit autotools-utils eutils systemd
|
||||
|
||||
DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
|
||||
HOMEPAGE="http://www.rsyslog.com/"
|
||||
SRC_URI="http://www.rsyslog.com/files/download/${PN}/${P}.tar.gz
|
||||
zeromq? ( https://github.com/aggregateknowledge/rsyslog-zeromq/tarball/44b551abc29dd5b541884bd51b45b413855a93d8 -> ${PN}-zeromq.tar.gz )"
|
||||
|
||||
LICENSE="GPL-3 LGPL-3 Apache-2.0"
|
||||
KEYWORDS="~amd64 ~arm ~hppa ~x86"
|
||||
SLOT="0"
|
||||
IUSE="dbi debug doc extras kerberos mysql oracle postgres relp snmp ssl static-libs zeromq zlib"
|
||||
|
||||
RDEPEND="dbi? ( dev-db/libdbi )
|
||||
extras? ( net-libs/libnet )
|
||||
kerberos? ( virtual/krb5 )
|
||||
mysql? ( virtual/mysql )
|
||||
postgres? ( dev-db/postgresql-base )
|
||||
oracle? ( dev-db/oracle-instantclient-basic )
|
||||
relp? ( >=dev-libs/librelp-0.1.3 )
|
||||
snmp? ( net-analyzer/net-snmp )
|
||||
ssl? ( net-libs/gnutls dev-libs/libgcrypt )
|
||||
zeromq? ( net-libs/zeromq )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig"
|
||||
|
||||
BRANCH="5-stable"
|
||||
|
||||
# need access to certain device nodes
|
||||
RESTRICT="test"
|
||||
|
||||
# Maitainer note : open a bug to upstream
|
||||
# showing that building in a separate dir fails
|
||||
AUTOTOOLS_IN_SOURCE_BUILD=1
|
||||
|
||||
DOCS=(AUTHORS ChangeLog doc/rsyslog-example.conf)
|
||||
|
||||
src_prepare() {
|
||||
# Maintainer notes:
|
||||
# ZeroMQ support, for now it is done by hand until upstream process bug.
|
||||
# Bugzilla : http://bugzilla.adiscon.com/show_bug.cgi?id=277
|
||||
if use zeromq; then
|
||||
local ZEROPATH=${WORKDIR}/aggregateknowledge-rsyslog-zeromq-44b551a
|
||||
epatch ${ZEROPATH}/rsyslog-zeromq.patch
|
||||
cp -r ${ZEROPATH}/{i,o}mzeromq "${S}/plugins"
|
||||
fi
|
||||
|
||||
# Don't force '-g' CFLAG
|
||||
sed -i 's/CFLAGS="\(.*\) -g"/CFLAGS="\1"/g' configure.ac || die
|
||||
autotools-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Maintainer notes:
|
||||
# * rfc3195 needs a library and development of that library
|
||||
# is suspended, so we disable it
|
||||
# * About the java GUI:
|
||||
# The maintainer says there is no real installation support
|
||||
# for the java GUI, so we disable it for now.
|
||||
local myeconfargs=(
|
||||
--disable-gui
|
||||
--disable-rfc3195
|
||||
--enable-largefile
|
||||
--enable-unlimited-select
|
||||
--enable-imdiag
|
||||
--enable-imfile
|
||||
--enable-impstats
|
||||
--enable-imtemplate
|
||||
--enable-imptcp
|
||||
--enable-mail
|
||||
--enable-omprog
|
||||
--enable-omstdout
|
||||
--enable-omtemplate
|
||||
--enable-omdbalerting
|
||||
--enable-omuxsock
|
||||
--enable-pmlastmsg
|
||||
--enable-pmrfc3164sd
|
||||
--enable-pmcisconames
|
||||
--enable-pmaixforwardedfrom
|
||||
--enable-pmsnare
|
||||
$(use_enable extras omudpspoof)
|
||||
$(use_enable zlib)
|
||||
$(use_enable mysql)
|
||||
$(use_enable dbi libdbi)
|
||||
$(use_enable postgres pgsql)
|
||||
$(use_enable oracle oracle)
|
||||
$(use_enable ssl gnutls)
|
||||
$(use_enable kerberos gssapi-krb5)
|
||||
$(use_enable relp)
|
||||
$(use_enable snmp)
|
||||
$(use_enable snmp mmsnmptrapd)
|
||||
$(use_enable debug)
|
||||
$(use_enable debug rtinst)
|
||||
$(use_enable debug diagtools)
|
||||
$(use_enable debug memcheck)
|
||||
$(use_enable debug valgrind)
|
||||
)
|
||||
|
||||
use zeromq && myeconfargs=(
|
||||
${myeconfargs[@]-}
|
||||
$(use_enable zeromq imzeromq)
|
||||
$(use_enable zeromq omzeromq)
|
||||
)
|
||||
|
||||
systemd_to_myeconfargs
|
||||
autotools-utils_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
use doc && HTML_DOCS=(doc/)
|
||||
autotools-utils_src_install
|
||||
|
||||
insinto /etc
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}-gentoo.conf" ${PN}.conf
|
||||
newconfd "${FILESDIR}/${BRANCH}/${PN}.confd" ${PN}
|
||||
newinitd "${FILESDIR}/${BRANCH}/${PN}.initd" ${PN}
|
||||
keepdir /var/spool/${PN}
|
||||
keepdir /etc/ssl/${PN}
|
||||
keepdir /etc/${PN}.d
|
||||
|
||||
use static-libs || find "${D}" -name '*.la' -delete || die
|
||||
|
||||
if use mysql; then
|
||||
insinto /usr/share/doc/${PF}/scripts/mysql
|
||||
doins plugins/ommysql/{createDB.sql,contrib/delete_mysql}
|
||||
fi
|
||||
|
||||
if use postgres; then
|
||||
insinto /usr/share/doc/${PF}/scripts/pgsql
|
||||
doins plugins/ompgsql/createDB.sql
|
||||
fi
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use mysql || use postgres; then
|
||||
echo
|
||||
elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
|
||||
elog " /usr/share/doc/${PF}/scripts"
|
||||
fi
|
||||
|
||||
if use ssl; then
|
||||
echo
|
||||
elog "To create a default CA and certificates for your server and clients, run:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "on your logging server. You can run it several times,"
|
||||
elog "once for each logging client. The client certificates will be signed"
|
||||
elog "using the CA certificate generated during the first run."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
if ! use ssl ; then
|
||||
einfo "There is nothing to configure for rsyslog unless you"
|
||||
einfo "used USE=ssl to build it."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Make sure the certificates directory exists
|
||||
CERTDIR="${ROOT}/etc/ssl/${PN}"
|
||||
if [ ! -d "${CERTDIR}" ]; then
|
||||
mkdir "${CERTDIR}" || die
|
||||
fi
|
||||
einfo "Your certificates will be stored in ${CERTDIR}"
|
||||
|
||||
# Create a default CA if needed
|
||||
if [ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]; then
|
||||
einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = Portage automated CA
|
||||
ca
|
||||
cert_signing_key
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-self-signed \
|
||||
--load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--outfile "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
# Create the server certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for server ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_server
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
else
|
||||
einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
|
||||
fi
|
||||
|
||||
# Create a client certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for client ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_client
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
rm -f "${T}/${PF}.$$"
|
||||
|
||||
echo
|
||||
einfo "Here is the documentation on how to encrypt your log traffic:"
|
||||
einfo " http://www.rsyslog.com/doc/rsyslog_tls.html"
|
||||
}
|
@ -1,254 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/rsyslog-5.8.11.ebuild,v 1.8 2012/08/19 19:07:06 armin76 Exp $
|
||||
|
||||
EAPI=4
|
||||
AUTOTOOLS_AUTORECONF=yes
|
||||
|
||||
inherit autotools-utils eutils systemd
|
||||
|
||||
DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
|
||||
HOMEPAGE="http://www.rsyslog.com/"
|
||||
SRC_URI="http://www.rsyslog.com/files/download/${PN}/${P}.tar.gz
|
||||
zeromq? ( https://github.com/aggregateknowledge/rsyslog-zeromq/tarball/44b551abc29dd5b541884bd51b45b413855a93d8 -> ${PN}-zeromq.tar.gz )"
|
||||
|
||||
LICENSE="GPL-3 LGPL-3 Apache-2.0"
|
||||
KEYWORDS="amd64 ~arm hppa x86"
|
||||
SLOT="0"
|
||||
IUSE="dbi debug doc extras kerberos mysql oracle postgres relp snmp ssl static-libs zeromq zlib"
|
||||
|
||||
RDEPEND="dbi? ( dev-db/libdbi )
|
||||
extras? ( net-libs/libnet )
|
||||
kerberos? ( virtual/krb5 )
|
||||
mysql? ( virtual/mysql )
|
||||
postgres? ( dev-db/postgresql-base )
|
||||
oracle? ( dev-db/oracle-instantclient-basic )
|
||||
relp? ( >=dev-libs/librelp-0.1.3 )
|
||||
snmp? ( net-analyzer/net-snmp )
|
||||
ssl? ( net-libs/gnutls dev-libs/libgcrypt )
|
||||
zeromq? ( net-libs/zeromq )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig"
|
||||
|
||||
BRANCH="5-stable"
|
||||
|
||||
# need access to certain device nodes
|
||||
RESTRICT="test"
|
||||
|
||||
# Maitainer note : open a bug to upstream
|
||||
# showing that building in a separate dir fails
|
||||
AUTOTOOLS_IN_SOURCE_BUILD=1
|
||||
|
||||
DOCS=(AUTHORS ChangeLog doc/rsyslog-example.conf)
|
||||
|
||||
src_prepare() {
|
||||
# Maintainer notes:
|
||||
# ZeroMQ support, for now it is done by hand until upstream process bug.
|
||||
# Bugzilla : http://bugzilla.adiscon.com/show_bug.cgi?id=277
|
||||
if use zeromq; then
|
||||
local ZEROPATH=${WORKDIR}/aggregateknowledge-rsyslog-zeromq-44b551a
|
||||
epatch ${ZEROPATH}/rsyslog-zeromq.patch
|
||||
cp -r ${ZEROPATH}/{i,o}mzeromq "${S}/plugins"
|
||||
fi
|
||||
|
||||
# Don't force '-g' CFLAG
|
||||
sed -i 's/CFLAGS="\(.*\) -g"/CFLAGS="\1"/g' configure.ac || die
|
||||
autotools-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Maintainer notes:
|
||||
# * rfc3195 needs a library and development of that library
|
||||
# is suspended, so we disable it
|
||||
# * About the java GUI:
|
||||
# The maintainer says there is no real installation support
|
||||
# for the java GUI, so we disable it for now.
|
||||
local myeconfargs=(
|
||||
--disable-gui
|
||||
--disable-rfc3195
|
||||
--enable-largefile
|
||||
--enable-unlimited-select
|
||||
--enable-imdiag
|
||||
--enable-imfile
|
||||
--enable-impstats
|
||||
--enable-imtemplate
|
||||
--enable-imptcp
|
||||
--enable-mail
|
||||
--enable-omprog
|
||||
--enable-omstdout
|
||||
--enable-omtemplate
|
||||
--enable-omdbalerting
|
||||
--enable-omuxsock
|
||||
--enable-pmlastmsg
|
||||
--enable-pmrfc3164sd
|
||||
--enable-pmcisconames
|
||||
--enable-pmaixforwardedfrom
|
||||
--enable-pmsnare
|
||||
$(use_enable extras omudpspoof)
|
||||
$(use_enable zlib)
|
||||
$(use_enable mysql)
|
||||
$(use_enable dbi libdbi)
|
||||
$(use_enable postgres pgsql)
|
||||
$(use_enable oracle oracle)
|
||||
$(use_enable ssl gnutls)
|
||||
$(use_enable kerberos gssapi-krb5)
|
||||
$(use_enable relp)
|
||||
$(use_enable snmp)
|
||||
$(use_enable snmp mmsnmptrapd)
|
||||
$(use_enable debug)
|
||||
$(use_enable debug rtinst)
|
||||
$(use_enable debug diagtools)
|
||||
$(use_enable debug memcheck)
|
||||
$(use_enable debug valgrind)
|
||||
)
|
||||
|
||||
use zeromq && myeconfargs=(
|
||||
${myeconfargs[@]-}
|
||||
$(use_enable zeromq imzeromq)
|
||||
$(use_enable zeromq omzeromq)
|
||||
)
|
||||
|
||||
systemd_to_myeconfargs
|
||||
autotools-utils_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
use doc && HTML_DOCS=(doc/)
|
||||
autotools-utils_src_install
|
||||
|
||||
insinto /etc
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}-gentoo.conf" ${PN}.conf
|
||||
newconfd "${FILESDIR}/${BRANCH}/${PN}.confd" ${PN}
|
||||
newinitd "${FILESDIR}/${BRANCH}/${PN}.initd" ${PN}
|
||||
keepdir /var/spool/${PN}
|
||||
keepdir /etc/ssl/${PN}
|
||||
keepdir /etc/${PN}.d
|
||||
|
||||
use static-libs || find "${D}" -name '*.la' -delete || die
|
||||
|
||||
if use mysql; then
|
||||
insinto /usr/share/doc/${PF}/scripts/mysql
|
||||
doins plugins/ommysql/{createDB.sql,contrib/delete_mysql}
|
||||
fi
|
||||
|
||||
if use postgres; then
|
||||
insinto /usr/share/doc/${PF}/scripts/pgsql
|
||||
doins plugins/ompgsql/createDB.sql
|
||||
fi
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use mysql || use postgres; then
|
||||
echo
|
||||
elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
|
||||
elog " /usr/share/doc/${PF}/scripts"
|
||||
fi
|
||||
|
||||
if use ssl; then
|
||||
echo
|
||||
elog "To create a default CA and certificates for your server and clients, run:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "on your logging server. You can run it several times,"
|
||||
elog "once for each logging client. The client certificates will be signed"
|
||||
elog "using the CA certificate generated during the first run."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
if ! use ssl ; then
|
||||
einfo "There is nothing to configure for rsyslog unless you"
|
||||
einfo "used USE=ssl to build it."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Make sure the certificates directory exists
|
||||
CERTDIR="${ROOT}/etc/ssl/${PN}"
|
||||
if [ ! -d "${CERTDIR}" ]; then
|
||||
mkdir "${CERTDIR}" || die
|
||||
fi
|
||||
einfo "Your certificates will be stored in ${CERTDIR}"
|
||||
|
||||
# Create a default CA if needed
|
||||
if [ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]; then
|
||||
einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = Portage automated CA
|
||||
ca
|
||||
cert_signing_key
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-self-signed \
|
||||
--load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--outfile "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
# Create the server certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for server ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_server
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
else
|
||||
einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
|
||||
fi
|
||||
|
||||
# Create a client certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for client ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_client
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
rm -f "${T}/${PF}.$$"
|
||||
|
||||
echo
|
||||
einfo "Here is the documentation on how to encrypt your log traffic:"
|
||||
einfo " http://www.rsyslog.com/doc/rsyslog_tls.html"
|
||||
}
|
@ -1,254 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/rsyslog-5.8.12.ebuild,v 1.2 2012/08/19 19:07:06 armin76 Exp $
|
||||
|
||||
EAPI=4
|
||||
AUTOTOOLS_AUTORECONF=yes
|
||||
|
||||
inherit autotools-utils eutils systemd
|
||||
|
||||
DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
|
||||
HOMEPAGE="http://www.rsyslog.com/"
|
||||
SRC_URI="http://www.rsyslog.com/files/download/${PN}/${P}.tar.gz
|
||||
zeromq? ( https://github.com/aggregateknowledge/rsyslog-zeromq/tarball/44b551abc29dd5b541884bd51b45b413855a93d8 -> ${PN}-zeromq.tar.gz )"
|
||||
|
||||
LICENSE="GPL-3 LGPL-3 Apache-2.0"
|
||||
KEYWORDS="~amd64 ~arm ~hppa ~x86"
|
||||
SLOT="0"
|
||||
IUSE="dbi debug doc extras kerberos mysql oracle postgres relp snmp ssl static-libs zeromq zlib"
|
||||
|
||||
RDEPEND="dbi? ( dev-db/libdbi )
|
||||
extras? ( net-libs/libnet )
|
||||
kerberos? ( virtual/krb5 )
|
||||
mysql? ( virtual/mysql )
|
||||
postgres? ( dev-db/postgresql-base )
|
||||
oracle? ( dev-db/oracle-instantclient-basic )
|
||||
relp? ( >=dev-libs/librelp-0.1.3 )
|
||||
snmp? ( net-analyzer/net-snmp )
|
||||
ssl? ( net-libs/gnutls dev-libs/libgcrypt )
|
||||
zeromq? ( net-libs/zeromq )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig"
|
||||
|
||||
BRANCH="5-stable"
|
||||
|
||||
# need access to certain device nodes
|
||||
RESTRICT="test"
|
||||
|
||||
# Maitainer note : open a bug to upstream
|
||||
# showing that building in a separate dir fails
|
||||
AUTOTOOLS_IN_SOURCE_BUILD=1
|
||||
|
||||
DOCS=(AUTHORS ChangeLog doc/rsyslog-example.conf)
|
||||
|
||||
src_prepare() {
|
||||
# Maintainer notes:
|
||||
# ZeroMQ support, for now it is done by hand until upstream process bug.
|
||||
# Bugzilla : http://bugzilla.adiscon.com/show_bug.cgi?id=277
|
||||
if use zeromq; then
|
||||
local ZEROPATH=${WORKDIR}/aggregateknowledge-rsyslog-zeromq-44b551a
|
||||
epatch ${ZEROPATH}/rsyslog-zeromq.patch
|
||||
cp -r ${ZEROPATH}/{i,o}mzeromq "${S}/plugins"
|
||||
fi
|
||||
|
||||
# Don't force '-g' CFLAG
|
||||
sed -i 's/CFLAGS="\(.*\) -g"/CFLAGS="\1"/g' configure.ac || die
|
||||
autotools-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Maintainer notes:
|
||||
# * rfc3195 needs a library and development of that library
|
||||
# is suspended, so we disable it
|
||||
# * About the java GUI:
|
||||
# The maintainer says there is no real installation support
|
||||
# for the java GUI, so we disable it for now.
|
||||
local myeconfargs=(
|
||||
--disable-gui
|
||||
--disable-rfc3195
|
||||
--enable-largefile
|
||||
--enable-unlimited-select
|
||||
--enable-imdiag
|
||||
--enable-imfile
|
||||
--enable-impstats
|
||||
--enable-imtemplate
|
||||
--enable-imptcp
|
||||
--enable-mail
|
||||
--enable-omprog
|
||||
--enable-omstdout
|
||||
--enable-omtemplate
|
||||
--enable-omdbalerting
|
||||
--enable-omuxsock
|
||||
--enable-pmlastmsg
|
||||
--enable-pmrfc3164sd
|
||||
--enable-pmcisconames
|
||||
--enable-pmaixforwardedfrom
|
||||
--enable-pmsnare
|
||||
$(use_enable extras omudpspoof)
|
||||
$(use_enable zlib)
|
||||
$(use_enable mysql)
|
||||
$(use_enable dbi libdbi)
|
||||
$(use_enable postgres pgsql)
|
||||
$(use_enable oracle oracle)
|
||||
$(use_enable ssl gnutls)
|
||||
$(use_enable kerberos gssapi-krb5)
|
||||
$(use_enable relp)
|
||||
$(use_enable snmp)
|
||||
$(use_enable snmp mmsnmptrapd)
|
||||
$(use_enable debug)
|
||||
$(use_enable debug rtinst)
|
||||
$(use_enable debug diagtools)
|
||||
$(use_enable debug memcheck)
|
||||
$(use_enable debug valgrind)
|
||||
)
|
||||
|
||||
use zeromq && myeconfargs=(
|
||||
${myeconfargs[@]-}
|
||||
$(use_enable zeromq imzeromq)
|
||||
$(use_enable zeromq omzeromq)
|
||||
)
|
||||
|
||||
systemd_to_myeconfargs
|
||||
autotools-utils_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
use doc && HTML_DOCS=(doc/)
|
||||
autotools-utils_src_install
|
||||
|
||||
insinto /etc
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}-gentoo.conf" ${PN}.conf
|
||||
newconfd "${FILESDIR}/${BRANCH}/${PN}.confd" ${PN}
|
||||
newinitd "${FILESDIR}/${BRANCH}/${PN}.initd" ${PN}
|
||||
keepdir /var/spool/${PN}
|
||||
keepdir /etc/ssl/${PN}
|
||||
keepdir /etc/${PN}.d
|
||||
|
||||
use static-libs || find "${D}" -name '*.la' -delete || die
|
||||
|
||||
if use mysql; then
|
||||
insinto /usr/share/doc/${PF}/scripts/mysql
|
||||
doins plugins/ommysql/{createDB.sql,contrib/delete_mysql}
|
||||
fi
|
||||
|
||||
if use postgres; then
|
||||
insinto /usr/share/doc/${PF}/scripts/pgsql
|
||||
doins plugins/ompgsql/createDB.sql
|
||||
fi
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use mysql || use postgres; then
|
||||
echo
|
||||
elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
|
||||
elog " /usr/share/doc/${PF}/scripts"
|
||||
fi
|
||||
|
||||
if use ssl; then
|
||||
echo
|
||||
elog "To create a default CA and certificates for your server and clients, run:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "on your logging server. You can run it several times,"
|
||||
elog "once for each logging client. The client certificates will be signed"
|
||||
elog "using the CA certificate generated during the first run."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
if ! use ssl ; then
|
||||
einfo "There is nothing to configure for rsyslog unless you"
|
||||
einfo "used USE=ssl to build it."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Make sure the certificates directory exists
|
||||
CERTDIR="${ROOT}/etc/ssl/${PN}"
|
||||
if [ ! -d "${CERTDIR}" ]; then
|
||||
mkdir "${CERTDIR}" || die
|
||||
fi
|
||||
einfo "Your certificates will be stored in ${CERTDIR}"
|
||||
|
||||
# Create a default CA if needed
|
||||
if [ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]; then
|
||||
einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = Portage automated CA
|
||||
ca
|
||||
cert_signing_key
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-self-signed \
|
||||
--load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--outfile "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
# Create the server certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for server ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_server
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
else
|
||||
einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
|
||||
fi
|
||||
|
||||
# Create a client certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for client ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_client
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
rm -f "${T}/${PF}.$$"
|
||||
|
||||
echo
|
||||
einfo "Here is the documentation on how to encrypt your log traffic:"
|
||||
einfo " http://www.rsyslog.com/doc/rsyslog_tls.html"
|
||||
}
|
@ -1,8 +1 @@
|
||||
DIST amanda-2.6.0p2.tar.gz 2402088 SHA256 3830d9c95cfe72e63aea5179208851a141481b037ec4060bf3d5829bf50e6ae3 SHA512 b62800fa5b51fa6875acea2967a849bd312bf0b22d452a093fab5b5c05b67ba8a4ed0f37775ae36ba727455352d910188460c489f185401d071ad2a14b63a72f WHIRLPOOL f9d55efa01969707d92b7ab74eb7221a5d987d0fe803a467ec51ddbf82e1446c6c81601e891834148cea34eae969383b9329de03a9a0617cddb83c241174eba3
|
||||
DIST amanda-2.6.1p2.tar.gz 2868102 SHA256 828c71040f1ccf69f9996907a3575b7dc27890ea7a5fae5eac77183125eda195 SHA512 40e74f74bce3beec2341693cb155107544a361a5a07fdd2b52fd9e27fd87ebc371bbe539a09d8b721a411fa00a417ab12f4d39ee059d1249154d14782bdc5bf2 WHIRLPOOL 119481e843220cdf799c2a6dbdd2c1235bfc17ac6b25c37d9501a146c7a7ee7d4f1de05ce51713d44370d0c9f46e5b680cfc18246f82fef71989e26c371b5816
|
||||
DIST amanda-3.2.1.tar.gz 4116514 SHA256 187b4ccc32af03b4ca6a9658f2d6a7884a934c7864730b0bb5bc5e82457b486f SHA512 56947c9514c7ce4f907c7531cd8a85ddf1b7c65096cb38400741010d5e1484c1e063f86e3d74335691c16f69bbb23e0577a90df7b50b9d46cbf28f9d643f74aa WHIRLPOOL 77524e1489848700ca4457b6e46776871ce285d3e086bb5aa873cb0d76996b1cdf00aaca3bb5111bf4e91b066cdc53d20cd55379ba2bd0db7b708030d97846a3
|
||||
DIST amanda-3.2.2.tar.gz 4120254 SHA256 6bf8e3e39a55e877d8cbe75b927b985b9316654af26a3bd47022a2a2c99b3bac SHA512 97917dd0d3da5d7de6595685d140427b444d894d5e310addf95fb7f7ba1ba32339e8b4f0a34daafd41ea8759d19905fe0f7e8aa00076e0ebca67551ba9db2c31 WHIRLPOOL 68c6d5b5c0bf2845cd7aa931b8ff12e1d76b5c22277e84a8a8bb88f70105d2ed17193247a2e83be3866781fc30edd33e10247d7594eb384ff84c98f30e59a415
|
||||
DIST amanda-3.2.3.tar.gz 4125405 SHA256 8ac37cc82add71ffd009fa4ea8763c633037277e15d51d28aefb8cb4c0b6a7fd SHA512 54742505afad7e74a16d47377f8dea43566017c1cb77f146fc11eaf408389dc5d33dd90da0b8a169e6ee69918aba4eab3a022671120c1312cb830fa5abe663da WHIRLPOOL 0f01917156cd08e148fb350785b0cba45f4e83f89973cedb0afe19b9015ea92b15e82d302cbf50882419936231ae8c172433888b3132a9feaba4f2a9ef8e80f8
|
||||
DIST amanda-3.3.0.tar.gz 4193702 SHA256 f2af2e8aec7750cd6ac7628e5425f673c75fc4e4a14992a24367b0ac2978f366 SHA512 dda0c7b7d2777d9bae46d6bda9104252f696914669080c7e538ab906d3f2f3e2c00cd479fe1db8d489873aa7215fe41b0ab3fc34b942922bf0cfc2c80393a694 WHIRLPOOL 6400d9df492aeb8d4dfe8b83dd286a7cd38acc3309c4058e6e3faaa8196c86e453b654b5bd75b53eec8ca4098528dad93de7c253631c057e0d0a7862bf5bfa0e
|
||||
DIST amanda-3.3.1.tar.gz 4328574 SHA256 190fcf84b7154494772d7ff6f8225fc165e89b4563437c6358549456f73e7612 SHA512 86b7b127c81e75bdc60bebbaf06e474667c364e66b3c12ed6797f1a5ef6971010bc20e4b596488586e0cde6cdbb7e0a96679cabf04d2e427d9eb2922347ebd66 WHIRLPOOL 6bd79359676492b181bc7bb9b044f7f50271361b1bb820e995d6c062bbb14d69baa5d0f3b7f6fafa87386cebc4a30c6a89b8c527744f8bbc05ff72595db80304
|
||||
DIST amanda-3.3.3.tar.gz 4394935 SHA256 c36c9cd61dc62a7824abb7ba74cc4b09527bd82a930d691cf207b60b4bb15b72 SHA512 42af74a9e3b3fd92600e78d98eb4cdcf9d260bd9bbd016dde4133db346374deb41e4893159205336b35521c36f737c2877fd5030028531e1c09a0a6ac2931ba9 WHIRLPOOL 730deda1d85e645e658500a01ea72895f836a3dd99209314a65161674da24fed5aad98313a8ef66ef76176c6c7b1a60e62d30d692cfe2121eb429d9cb37f5636
|
||||
|
@ -1,516 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-2.6.0_p2-r4.ebuild,v 1.20 2013/02/26 23:00:38 robbat2 Exp $
|
||||
|
||||
inherit perl-module autotools eutils user
|
||||
|
||||
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
|
||||
HOMEPAGE="http://www.amanda.org/"
|
||||
SRC_URI="mirror://sourceforge/amanda/${P/_/}.tar.gz"
|
||||
LICENSE="HPND BSD GPL-2 GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc ppc64 ~sparc x86"
|
||||
RDEPEND="sys-libs/readline
|
||||
virtual/inetd
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
dev-lang/perl
|
||||
app-arch/dump
|
||||
net-misc/openssh
|
||||
dev-libs/glib
|
||||
s3? ( net-misc/curl )
|
||||
samba? ( net-fs/samba )
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
!sparc? ( xfs? ( sys-fs/xfsdump ) )
|
||||
!minimal? ( virtual/mailx
|
||||
app-arch/mt-st
|
||||
sys-block/mtx
|
||||
sci-visualization/gnuplot
|
||||
app-crypt/aespipe
|
||||
app-crypt/gnupg )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/autoconf
|
||||
sys-devel/automake"
|
||||
|
||||
IUSE="berkdb debug gdbm minimal s3 samba xfs kerberos devpay ipv6"
|
||||
|
||||
S="${WORKDIR}/${P/_/}"
|
||||
MYFILESDIR="${WORKDIR}/files"
|
||||
MYTMPDIR="${WORKDIR}/tmp"
|
||||
MYINSTTMPDIR="/usr/share/amanda"
|
||||
ENVDIR="/etc/env.d"
|
||||
ENVDFILE="97amanda"
|
||||
TMPENVFILE="${MYTMPDIR}/${ENVDFILE}"
|
||||
TMPINSTENVFILE="${MYINSTTMPDIR}/tmpenv-${ENVDFILE}"
|
||||
|
||||
# This is a complete list of Amanda settings that the ebuild takes from the
|
||||
# build environment. This allows users to alter the behavior of the package as
|
||||
# upstream intended, but keeping with Gentoo style. We store a copy of them in
|
||||
# /etc/env.d/97amanda during the install, so that they are preserved for future
|
||||
# installed. This variable name must not start with AMANDA_, as we do not want
|
||||
# it captured into the env file.
|
||||
ENV_SETTINGS_AMANDA="
|
||||
AMANDA_GROUP_GID AMANDA_GROUP_NAME
|
||||
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
|
||||
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
|
||||
AMANDA_TAR_LISTDIR AMANDA_TAR
|
||||
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
|
||||
AMANDA_CONFIG_NAME AMANDA_TMPDIR AMANDA_MAX_TAPE_BLOCK_KB"
|
||||
|
||||
amanda_variable_setup() {
|
||||
|
||||
# Setting vars
|
||||
local currentamanda
|
||||
|
||||
# Grab the current settings
|
||||
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
|
||||
use debug && einfo "Current settings: ${currentamanda}"
|
||||
#for i in ${currentamanda}; do
|
||||
# eval `eval echo ${i}`
|
||||
# echo "Setting: ${i}"
|
||||
#done;
|
||||
|
||||
# First we set the defaults
|
||||
[ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
|
||||
[ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
|
||||
[ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
|
||||
[ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
|
||||
[ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=-1
|
||||
[ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
|
||||
[ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
|
||||
|
||||
# This installs Amanda, with the server. However, it could be a client,
|
||||
# just specify an alternate server name in AMANDA_SERVER.
|
||||
[ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
|
||||
[ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
|
||||
[ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
|
||||
[ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
|
||||
[ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
|
||||
# These are left empty by default
|
||||
[ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
|
||||
[ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
|
||||
[ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
|
||||
[ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
|
||||
|
||||
# What tar to use
|
||||
[ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
|
||||
|
||||
# Text mode is the only one left.
|
||||
AMANDA_DBMODE='text'
|
||||
|
||||
# Raise maximum configurable blocksize
|
||||
[ -z "${AMANDA_MAX_TAPE_BLOCK_KB}" ] && AMANDA_MAX_TAPE_BLOCK_KB=512
|
||||
|
||||
# Now pull in the old stuff
|
||||
if [ -f "${ENVDIR}/${ENVDFILE}" ]; then
|
||||
# We don't just source it as we don't want everything in there.
|
||||
eval $(egrep "^AMANDA_" ${ENVDIR}/${ENVDFILE} | grep -v '^AMANDA_ENV_SETTINGS')
|
||||
fi
|
||||
|
||||
# Re-apply the new settings if any
|
||||
[ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
|
||||
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
# Now add users if needed
|
||||
[ -n "${AMANDA_DBMODE}" -a "${AMANDA_DBMODE}" != "text" ] && \
|
||||
ewarn "Using db or gdbm modes for the database is no longer supported."
|
||||
amanda_variable_setup
|
||||
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
|
||||
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
|
||||
# Gentoo bug #192296, chg-multi fails
|
||||
#EPATCH_OPTS="-d ${S}" epatch \
|
||||
# "${FILESDIR}"/${PN}-2.5.2_p1-chg-multi.patch \
|
||||
# || die "Failed to apply patch to correct typo in chg-multi!"
|
||||
|
||||
# Gentoo bug #212970, --as-needed linking
|
||||
#EPATCH_OPTS="-d ${S}" epatch \
|
||||
# "${FILESDIR}"/${PN}-2.5.2_p1-fix-asneeded.patch \
|
||||
# || die "Failed to apply patch to correct bug #212970!"
|
||||
|
||||
# Fix a fun race condition if you use encryption.
|
||||
# This is one of the reasons you should test your recovery procedures often.
|
||||
EPATCH_OPTS="-d ${S} -p1" epatch \
|
||||
"${FILESDIR}"/${PN}-2.6.0p2-amcrypt-ossl-asym-race-fix.patch \
|
||||
|| die "Failed to apply race fix for encryption"
|
||||
|
||||
# gentoo bug 248838, check /sbin stuff before /bin
|
||||
EPATCH_OPTS="-d ${S} -p1" epatch \
|
||||
"${FILESDIR}"/amanda-2.6.0_p2-syslocpath.patch \
|
||||
|| die "Failed to fix sysloc path bug"
|
||||
|
||||
cd "${S}"
|
||||
epatch "${FILESDIR}"/s3-list-keys.diff
|
||||
cd "${S}"/device-src
|
||||
epatch "${FILESDIR}"/s3.c.part2.diff
|
||||
|
||||
cd "${S}"
|
||||
epatch "${FILESDIR}"/${P}-coreutils.patch
|
||||
|
||||
#sed -i 's,amanda_working_ipv6,amanda_cv_working_ipv6,g' \
|
||||
# "${S}"/configure.in || die "failed to sed"
|
||||
# rm -f "${S}"/acinclude.m4
|
||||
eautomake
|
||||
|
||||
# now the real fun
|
||||
amanda_variable_setup
|
||||
# places for us to work in
|
||||
mkdir -p "${MYFILESDIR}" "${MYTMPDIR}"
|
||||
# Now we store the settings we just created
|
||||
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
local myconf
|
||||
cd "${S}"
|
||||
|
||||
#einfo "Using '${AMANDA_DBMODE}' style database"
|
||||
#myconf="${myconf} --with-db=${AMANDA_DBMODE}"
|
||||
einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
|
||||
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
|
||||
einfo "Using ${AMANDA_SERVER_INDEX} for index server."
|
||||
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
|
||||
einfo "Using ${AMANDA_USER_NAME} for amanda user."
|
||||
myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
|
||||
einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
|
||||
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
|
||||
einfo "Using ${AMANDA_TAR} as Tar implementation."
|
||||
myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
|
||||
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
|
||||
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
|
||||
einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
|
||||
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
|
||||
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
|
||||
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
|
||||
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
|
||||
eerror "If you want _both_ UDP and TCP ports, please use only the"
|
||||
eerror "AMANDA_PORTS environment variable for identical ports, or set"
|
||||
eerror "AMANDA_PORTS_BOTH."
|
||||
die "Bad port setup!"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ]; then
|
||||
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
|
||||
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_TCP}" ]; then
|
||||
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
|
||||
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS}" ]; then
|
||||
einfo "Using ports ${AMANDA_PORTS/,/-}"
|
||||
myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
|
||||
fi
|
||||
|
||||
# Extras
|
||||
# Speed option
|
||||
myconf="${myconf} --with-buffered-dump"
|
||||
# "debugging" in the configuration is NOT debug in the conventional sense.
|
||||
# It is actually just useful output in the application, and should remain
|
||||
# enabled. There are some cases of breakage with MTX tape changers as of
|
||||
# 2.5.1p2 that it exposes when turned off as well.
|
||||
myconf="${myconf} --with-debugging"
|
||||
# Where to put our files
|
||||
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
|
||||
|
||||
# Samba support
|
||||
myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
|
||||
|
||||
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
|
||||
# default
|
||||
myconf="${myconf} --with-bsd-security"
|
||||
myconf="${myconf} --with-ssh-security"
|
||||
myconf="${myconf} --with-bsdudp-security"
|
||||
myconf="${myconf} --with-bsdtcp-security"
|
||||
|
||||
# kerberos-security mechanism version 4
|
||||
# always disable, per bug #173354
|
||||
myconf="${myconf} --without-krb4-security"
|
||||
|
||||
# kerberos-security mechanism version 5
|
||||
myconf="${myconf} `use_with kerberos krb5-security`"
|
||||
|
||||
# Amazon S3 support
|
||||
myconf="${myconf} `use_enable s3 s3-device`"
|
||||
myconf="${myconf} `use_enable devpay devpay`"
|
||||
|
||||
# Client only, as requested in bug #127725
|
||||
use minimal && myconf="${myconf} --without-server"
|
||||
|
||||
# Raise maximum configurable blocksize
|
||||
myconf="${myconf} --with-maxtapeblocksize=${AMANDA_MAX_TAPE_BLOCK_KB}"
|
||||
|
||||
# Install perl modules to vendor_perl
|
||||
perlinfo
|
||||
myconf="${myconf} --with-amperldir=${VENDOR_ARCH}"
|
||||
|
||||
# IPv6 fun.
|
||||
myconf="${myconf} `use_with ipv6`"
|
||||
|
||||
econf ${myconf} || die "econf failed!"
|
||||
emake -j1 || die "emake failed!"
|
||||
|
||||
# Compile the tapetype program too
|
||||
# This is deprecated, use amtapetype instead!
|
||||
# cd tape-src
|
||||
# emake tapetype || die "emake tapetype failed!"
|
||||
|
||||
# Only needed if you we do versioning
|
||||
#dosed "s,/usr/local/bin/perl,/usr/bin/perl," ${S}/contrib/set_prod_link.pl
|
||||
#perl ${S}/contrib/set_prod_link.pl
|
||||
|
||||
}
|
||||
|
||||
src_install() {
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source ${TMPENVFILE}
|
||||
|
||||
einfo "Doing stock install"
|
||||
emake -j1 DESTDIR="${D}" install || die
|
||||
|
||||
# Prepare our custom files
|
||||
einfo "Building custom configuration files"
|
||||
cp "${FILESDIR}"/amanda-* "${MYFILESDIR}"
|
||||
local i # our iterator
|
||||
local sedexpr # var for sed expr
|
||||
sedexpr=''
|
||||
for i in ${ENV_SETTINGS_AMANDA} ; do
|
||||
local val
|
||||
eval "val=\"\${${i}}\""
|
||||
sedexpr="${sedexpr}s|__${i}__|${val}|g;"
|
||||
done
|
||||
#einfo "Compiled SED expression: '${sedexpr}'"
|
||||
|
||||
# now apply the sed expr
|
||||
for i in "${FILESDIR}"/amanda-* ; do
|
||||
local filename
|
||||
filename="`basename ${i}`"
|
||||
#einfo "Applying compiled SED expression to ${filename}"
|
||||
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}"/${filename}
|
||||
done
|
||||
|
||||
# Build the envdir file
|
||||
# Don't forget this..
|
||||
einfo "Building environment file"
|
||||
local t
|
||||
t="${MYFILESDIR}"/${ENVDFILE}
|
||||
echo "# These settings are what was present in the environment when this" >>"${t}"
|
||||
echo "# Amanda was compiled. Changing anything below this comment will" >>"${t}"
|
||||
echo "# have no effect on your application, but it merely exists to" >>"${t}"
|
||||
echo "# preserve them for your next emerge of Amanda" >>"${t}"
|
||||
cat "${TMPENVFILE}" | sed "s,=\$,='',g" >>"${t}"
|
||||
|
||||
into /usr
|
||||
|
||||
# Deprecated, use amtapetype instead
|
||||
#einfo "Installing tapetype utility"
|
||||
#newsbin tape-src/tapetype tapetype
|
||||
|
||||
# docs
|
||||
einfo "Installing documentation"
|
||||
dodoc AUTHORS C* INSTALL NEWS README DEVELOPING ReleaseNotes UPGRADING
|
||||
# Clean up some bits
|
||||
dodoc "${D}"/usr/share/amanda/*
|
||||
rm -rf "${D}"/usr/share/amanda
|
||||
|
||||
# Do not remove these next two lines
|
||||
# This file is created, and installed, but then removed at the start of
|
||||
# pkg_postinst. It simply insures that the settings that Amanda is built
|
||||
# with are used very early in the postinst, and override any prior existing
|
||||
# settings in the /etc/env.d/97amanda
|
||||
mkdir -p "${D}"/${MYINSTTMPDIR} || die
|
||||
cp "${TMPENVFILE}" "${D}"/${TMPINSTENVFILE} || die
|
||||
|
||||
# our inetd sample
|
||||
einfo "Installing standard inetd sample"
|
||||
newdoc "${MYFILESDIR}"/amanda-inetd.amanda.sample-2.6.0_p2-r2 amanda-inetd.amanda.sample
|
||||
# Labels
|
||||
einfo "Installing labels"
|
||||
docinto labels
|
||||
dodoc "${S}"/example/3hole.ps
|
||||
dodoc "${S}"/example/8.5x11.ps
|
||||
dodoc "${S}"/example/DIN-A4.ps
|
||||
dodoc "${S}"/example/DLT.ps
|
||||
dodoc "${S}"/example/EXB-8500.ps
|
||||
dodoc "${S}"/example/HP-DAT.ps
|
||||
# Amanda example configs
|
||||
einfo "Installing example configurations"
|
||||
docinto example
|
||||
dodoc "${S}"/example/*
|
||||
docinto example1
|
||||
newdoc "${FILESDIR}"/example_amanda.conf amanda.conf
|
||||
newdoc "${FILESDIR}"/example_disklist-2.5.1_p3-r1 disklist
|
||||
newdoc "${FILESDIR}"/example_global.conf global.conf
|
||||
docinto example2
|
||||
newdoc "${S}"/example/amanda.conf amanda.conf
|
||||
newdoc "${S}"/example/disklist disklist
|
||||
# Compress it all
|
||||
prepalldocs
|
||||
|
||||
# Just make sure it exists for XFS to work...
|
||||
use !sparc && use xfs && keepdir /var/xfsdump/inventory
|
||||
|
||||
insinto /etc/amanda
|
||||
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
|
||||
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 \
|
||||
>>"${D}"/etc/amanda/amandahosts
|
||||
use minimal \
|
||||
|| cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1 \
|
||||
>>"${D}"/etc/amanda/amandahosts
|
||||
|
||||
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}"/.amandahosts
|
||||
insinto "${AMANDA_USER_HOMEDIR}"
|
||||
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
|
||||
newins "${MYFILESDIR}"/amanda-profile .profile
|
||||
|
||||
einfo "Installing Sample Daily Cron Job for Amanda"
|
||||
CRONDIR=/etc/cron.daily/
|
||||
exeinto ${CRONDIR}
|
||||
newexe "${MYFILESDIR}"/amanda-cron amanda
|
||||
# Not executable by default
|
||||
fperms 644 ${CRONDIR}/amanda
|
||||
|
||||
insinto /etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
keepdir /etc/amanda
|
||||
keepdir /etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
|
||||
local i
|
||||
for i in ${AMANDA_USER_HOMEDIR} ${AMANDA_TAR_LISTDIR} \
|
||||
${AMANDA_TMPDIR} ${AMANDA_TMPDIR}/dumps \
|
||||
${AMANDA_USER_HOMEDIR}/amanda \
|
||||
${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME} \
|
||||
/etc/amanda /etc/amanda/${AMANDA_CONFIG_NAME}; do
|
||||
einfo "Securing directory (${i})"
|
||||
dodir ${i}
|
||||
keepdir ${i}
|
||||
fowners ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
|
||||
fperms 700 ${i}
|
||||
done
|
||||
|
||||
einfo "Setting setuid permissions"
|
||||
amanda_permissions_fix "${D}"
|
||||
|
||||
# DevFS
|
||||
einfo "Installing DevFS config file"
|
||||
insinto /etc/devfs.d
|
||||
newins "${MYFILESDIR}"/amanda-devfs amanda
|
||||
|
||||
# Env.d
|
||||
einfo "Installing environment config file"
|
||||
doenvd "${MYFILESDIR}"/${ENVDFILE}
|
||||
|
||||
# Installing Amanda Xinetd Services Definition
|
||||
einfo "Installing xinetd service file"
|
||||
insinto /etc/xinetd.d
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.0_p2-r2 amanda
|
||||
|
||||
}
|
||||
|
||||
do_initial() {
|
||||
path="$1"
|
||||
shift
|
||||
for i in $* ; do
|
||||
einfo "Creating inital Amanda file (${i}) in $path"
|
||||
touch "${ROOT}"/${path}/${i}
|
||||
chown ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} "${ROOT}"/${path}/${i}
|
||||
chmod 600 "${ROOT}"/${path}/${i}
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local aux="${ROOT}"/${TMPINSTENVFILE}
|
||||
[ ! -f "${aux}" ] && die "Variable setting file (${aux}) should exist!"
|
||||
source "${aux}"
|
||||
rm "${aux}"
|
||||
rmdir "${ROOT}"/${MYINSTTMPDIR} 2>/dev/null # ignore error
|
||||
|
||||
# Migration of amandates from /etc to $localstatedir/amanda
|
||||
if [ -f "${ROOT}/etc/amandates" -a \
|
||||
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
|
||||
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
|
||||
einfo "A backup is also placed at /etc/amandates.orig"
|
||||
cp -f "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
|
||||
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
|
||||
cp -f "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
|
||||
fi
|
||||
if [ -f "${ROOT}/etc/amandates" ]; then
|
||||
einfo "If you have migrated safely, please delete /etc/amandates"
|
||||
fi
|
||||
# Do setups
|
||||
do_initial /etc dumpdates
|
||||
do_initial "${AMANDA_USER_HOMEDIR}/amanda" amandates
|
||||
|
||||
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
|
||||
# another host than HOSTNAME.
|
||||
if use minimal; then
|
||||
if [[ "${AMANDA_SERVER}" = "${HOSTNAME}" ]]; then
|
||||
echo
|
||||
ewarn "You are installing a client-only version of Amanda."
|
||||
ewarn "You should set the variable $AMANDA_SERVER to point at your"
|
||||
ewarn "Amanda-tape-server, otherwise you will have to specify its name"
|
||||
ewarn "when using amrecover on the client."
|
||||
ewarn "For example: Use something like"
|
||||
ewarn "AMANDA_SERVER=\"myserver\" emerge amanda"
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
|
||||
einfo "Checking setuid permissions"
|
||||
amanda_permissions_fix "${ROOT}"
|
||||
|
||||
elog "You should configure Amanda in /etc/amanda now."
|
||||
elog
|
||||
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
|
||||
elog "and restart xinetd afterwards!"
|
||||
elog
|
||||
elog "Otherwise, please look at /usr/share/doc/${P}/inetd.amanda.sample"
|
||||
elog "as an example of how to configure your inetd."
|
||||
elog
|
||||
elog "NOTICE: If you need raw access to partitions you need to add the"
|
||||
elog "amanda user to the 'disk' group and uncomment following lines in"
|
||||
elog "your /etc/devfs.d/amanda:"
|
||||
elog "SCSI:"
|
||||
elog "REGISTER ^scsi/host.*/bus.*/target.*/lun.*/part[0-9] PERMISSIONS root.disk 660"
|
||||
elog "IDE:"
|
||||
elog "REGISTER ^ide/host.*/bus.*/target.*/lun.*/part[0-9] PERMISSIONS root.disk 660"
|
||||
elog
|
||||
elog "NOTICE: If you have a tape changer, also uncomment the following"
|
||||
elog "REGISTER ^scsi/host.*/bus.*/target.*/lun.*/generic PERMISSIONS root.disk 660"
|
||||
elog
|
||||
elog "If you use localhost in your disklist your restores may break."
|
||||
elog "You should replace it with the actual hostname!"
|
||||
elog "Please also see the syntax changes to amandahosts."
|
||||
}
|
||||
|
||||
# We have had reports of amanda file permissions getting screwed up.
|
||||
# Losing setuid, becoming too lax etc.
|
||||
# ONLY root and users in the amanda group should be able to run these binaries!
|
||||
amanda_permissions_fix() {
|
||||
local root="$1"
|
||||
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
|
||||
local le="/usr/libexec/amanda"
|
||||
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
|
||||
"${le}"/rundump "${le}"/runtar "${le}"/dumper \
|
||||
"${le}"/planner ; do
|
||||
chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
|
||||
chmod u=srwx,g=rx,o= "${root}"/${i}
|
||||
done
|
||||
}
|
@ -1,419 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-2.6.1_p2.ebuild,v 1.11 2013/02/26 23:00:38 robbat2 Exp $
|
||||
|
||||
inherit autotools eutils user
|
||||
|
||||
MY_P="${P/_}"
|
||||
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
|
||||
HOMEPAGE="http://www.amanda.org/"
|
||||
SRC_URI="mirror://sourceforge/amanda/${MY_P}.tar.gz"
|
||||
LICENSE="HPND BSD GPL-2 GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="sys-libs/readline
|
||||
virtual/inetd
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
>=dev-lang/perl-5.6
|
||||
app-arch/dump
|
||||
net-misc/openssh
|
||||
>=dev-libs/glib-2.2
|
||||
nls? ( virtual/libintl )
|
||||
s3? ( >=net-misc/curl-7.10.0 )
|
||||
samba? ( net-fs/samba )
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
xfs? ( sys-fs/xfsdump )
|
||||
!minimal? (
|
||||
virtual/mailx
|
||||
app-arch/mt-st
|
||||
sys-block/mtx
|
||||
gnuplot? ( sci-visualization/gnuplot )
|
||||
app-crypt/aespipe
|
||||
app-crypt/gnupg
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
IUSE="gnuplot ipv6 kerberos minimal nls s3 samba xfs"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
MYFILESDIR="${T}/files"
|
||||
ENVDIR="/etc/env.d"
|
||||
ENVDFILE="97amanda"
|
||||
TMPENVFILE="${T}/${ENVDFILE}"
|
||||
|
||||
# This is a complete list of Amanda settings that the ebuild takes from the
|
||||
# build environment. This allows users to alter the behavior of the package as
|
||||
# upstream intended, but keeping with Gentoo style. We store a copy of them in
|
||||
# /etc/env.d/97amanda during the install, so that they are preserved for future
|
||||
# installed. This variable name must not start with AMANDA_, as we do not want
|
||||
# it captured into the env file.
|
||||
ENV_SETTINGS_AMANDA="
|
||||
AMANDA_GROUP_GID AMANDA_GROUP_NAME
|
||||
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
|
||||
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
|
||||
AMANDA_TAR_LISTDIR AMANDA_TAR
|
||||
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
|
||||
AMANDA_CONFIG_NAME AMANDA_TMPDIR"
|
||||
|
||||
amanda_variable_setup() {
|
||||
|
||||
# Setting vars
|
||||
local currentamanda
|
||||
|
||||
# Grab the current settings
|
||||
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
|
||||
|
||||
# First we set the defaults
|
||||
[ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
|
||||
[ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
|
||||
[ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
|
||||
[ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
|
||||
[ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash
|
||||
[ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
|
||||
[ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
|
||||
|
||||
# This installs Amanda, with the server. However, it could be a client,
|
||||
# just specify an alternate server name in AMANDA_SERVER.
|
||||
[ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
|
||||
[ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
|
||||
[ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
|
||||
[ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
|
||||
[ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
|
||||
# These are left empty by default
|
||||
[ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
|
||||
[ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
|
||||
[ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
|
||||
[ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
|
||||
|
||||
# What tar to use
|
||||
[ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
|
||||
|
||||
# Now pull in the old stuff
|
||||
if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then
|
||||
# We don't just source it as we don't want everything in there.
|
||||
eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
|
||||
fi
|
||||
|
||||
# Re-apply the new settings if any
|
||||
[ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
|
||||
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
amanda_variable_setup
|
||||
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
|
||||
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Fix a fun race condition if you use encryption.
|
||||
# This is one of the reasons you should test your recovery procedures often.
|
||||
epatch "${FILESDIR}"/${PN}-2.6.0p2-amcrypt-ossl-asym-race-fix.patch
|
||||
|
||||
# gentoo bug 248838, check /sbin stuff before /bin
|
||||
epatch "${FILESDIR}"/${PN}-2.6.0_p2-syslocpath.patch
|
||||
|
||||
eautoreconf
|
||||
|
||||
# places for us to work in
|
||||
mkdir -p "${MYFILESDIR}"
|
||||
# Now we store the settings we just created
|
||||
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
|
||||
|
||||
# Prepare our custom files
|
||||
einfo "Building custom configuration files"
|
||||
local i # our iterator
|
||||
local sedexpr # var for sed expr
|
||||
sedexpr=''
|
||||
for i in ${ENV_SETTINGS_AMANDA} ; do
|
||||
local val
|
||||
eval "val=\"\${${i}}\""
|
||||
sedexpr="${sedexpr}s|__${i}__|${val}|g;"
|
||||
done
|
||||
|
||||
# now apply the sed expr
|
||||
for i in "${FILESDIR}"/amanda-* ; do
|
||||
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`"
|
||||
done
|
||||
|
||||
(
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1
|
||||
use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1
|
||||
) > "${T}"/amandahosts
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
local myconf
|
||||
|
||||
einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
|
||||
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
|
||||
einfo "Using ${AMANDA_SERVER_INDEX} for index server."
|
||||
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
|
||||
einfo "Using ${AMANDA_USER_NAME} for amanda user."
|
||||
myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
|
||||
einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
|
||||
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
|
||||
einfo "Using ${AMANDA_TAR} as Tar implementation."
|
||||
myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
|
||||
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
|
||||
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
|
||||
einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
|
||||
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
|
||||
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
|
||||
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
|
||||
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
|
||||
eerror "If you want _both_ UDP and TCP ports, please use only the"
|
||||
eerror "AMANDA_PORTS environment variable for identical ports, or set"
|
||||
eerror "AMANDA_PORTS_BOTH."
|
||||
die "Bad port setup!"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ]; then
|
||||
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
|
||||
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_TCP}" ]; then
|
||||
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
|
||||
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS}" ]; then
|
||||
einfo "Using ports ${AMANDA_PORTS/,/-}"
|
||||
myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
|
||||
fi
|
||||
|
||||
# Extras
|
||||
# Speed option
|
||||
myconf="${myconf} --with-buffered-dump"
|
||||
# "debugging" in the configuration is NOT debug in the conventional sense.
|
||||
# It is actually just useful output in the application, and should remain
|
||||
# enabled. There are some cases of breakage with MTX tape changers as of
|
||||
# 2.5.1p2 that it exposes when turned off as well.
|
||||
myconf="${myconf} --with-debugging"
|
||||
# Where to put our files
|
||||
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
|
||||
|
||||
# Samba support
|
||||
myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
|
||||
|
||||
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
|
||||
# default
|
||||
myconf="${myconf} --with-bsd-security"
|
||||
myconf="${myconf} --with-ssh-security"
|
||||
myconf="${myconf} --with-bsdudp-security"
|
||||
myconf="${myconf} --with-bsdtcp-security"
|
||||
|
||||
# kerberos-security mechanism version 4
|
||||
# always disable, per bug #173354
|
||||
myconf="${myconf} --without-krb4-security"
|
||||
|
||||
# kerberos-security mechanism version 5
|
||||
myconf="${myconf} `use_with kerberos krb5-security`"
|
||||
|
||||
# Amazon S3 support
|
||||
myconf="${myconf} `use_enable s3 s3-device`"
|
||||
|
||||
# Client only, as requested in bug #127725
|
||||
if use minimal ; then
|
||||
myconf="${myconf} --without-server"
|
||||
else
|
||||
# amplot
|
||||
myconf="${myconf} $(use_with gnuplot)"
|
||||
fi
|
||||
|
||||
# IPv6 fun.
|
||||
myconf="${myconf} `use_with ipv6`"
|
||||
# This is to prevent the IPv6-is-working test
|
||||
# As the test fails on binpkg build hosts with no IPv6.
|
||||
use ipv6 && export amanda_cv_working_ipv6=yes
|
||||
|
||||
# I18N
|
||||
myconf="${myconf} `use_enable nls`"
|
||||
|
||||
econf ${myconf} || die "econf failed!"
|
||||
emake || die "emake failed!"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source ${TMPENVFILE}
|
||||
|
||||
einfo "Doing stock install"
|
||||
# parallel make install b0rked
|
||||
emake -j1 DESTDIR="${D}" install || die
|
||||
|
||||
# Build the envdir file
|
||||
# Don't forget this..
|
||||
einfo "Building environment file"
|
||||
(
|
||||
echo "# These settings are what was present in the environment when this"
|
||||
echo "# Amanda was compiled. Changing anything below this comment will"
|
||||
echo "# have no effect on your application, but it merely exists to"
|
||||
echo "# preserve them for your next emerge of Amanda"
|
||||
cat "${TMPENVFILE}" | sed "s,=\$,='',g"
|
||||
) >> "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Env.d
|
||||
einfo "Installing environment config file"
|
||||
doenvd "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Lock down next section (up until docs).
|
||||
insopts -m0640
|
||||
# Installing Amanda Xinetd Services Definition
|
||||
einfo "Installing xinetd service file"
|
||||
insinto /etc/xinetd.d
|
||||
if use minimal ; then
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
|
||||
else
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
|
||||
fi
|
||||
|
||||
einfo "Installing Sample Daily Cron Job for Amanda"
|
||||
insinto /etc/cron.daily
|
||||
newins "${MYFILESDIR}/amanda-cron" amanda
|
||||
|
||||
insinto /etc/amanda
|
||||
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
|
||||
doins "${T}/amandahosts"
|
||||
fperms 600 /etc/amanda/amandahosts
|
||||
|
||||
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
|
||||
insinto "${AMANDA_USER_HOMEDIR}"
|
||||
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
|
||||
newins "${MYFILESDIR}/amanda-profile" .profile
|
||||
|
||||
insinto /etc/amanda
|
||||
doins "${S}/example/amanda-client.conf"
|
||||
if ! use minimal ; then
|
||||
insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
|
||||
doins "${S}/example/amanda.conf"
|
||||
doins "${S}/example/disklist"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
|
||||
fi
|
||||
|
||||
keepdir "${AMANDA_TAR_LISTDIR}"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/amanda"
|
||||
keepdir "${AMANDA_TMPDIR}/dumps"
|
||||
# Just make sure it exists for XFS to work...
|
||||
use xfs && keepdir /var/xfsdump/inventory
|
||||
|
||||
local i
|
||||
for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" /etc/amanda; do
|
||||
einfo "Securing directory (${i})"
|
||||
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
|
||||
done
|
||||
# Do NOT use -R
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
|
||||
"${AMANDA_USER_HOMEDIR}/amanda" \
|
||||
"${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
|
||||
/etc/amanda /etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
|
||||
einfo "Setting setuid permissions"
|
||||
amanda_permissions_fix "${D}"
|
||||
|
||||
# Relax permissions again
|
||||
insopts -m0644
|
||||
|
||||
# docs
|
||||
einfo "Installing documentation"
|
||||
dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
|
||||
# our inetd sample
|
||||
einfo "Installing standard inetd sample"
|
||||
newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
|
||||
# Amanda example configs
|
||||
einfo "Installing example configurations"
|
||||
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
|
||||
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
|
||||
docinto example1
|
||||
newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
|
||||
newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
|
||||
newdoc "${FILESDIR}/example_global.conf" global.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[ ! -f "${TMPENVFILE}" -a "$EMERGE_FROM" == "binary" ] && \
|
||||
TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
||||
# Migration of amandates from /etc to $localstatedir/amanda
|
||||
if [ -f "${ROOT}/etc/amandates" -a \
|
||||
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
|
||||
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
|
||||
einfo "A backup is also placed at /etc/amandates.orig"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
|
||||
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
|
||||
fi
|
||||
if [ -f "${ROOT}/etc/amandates" ]; then
|
||||
einfo "If you have migrated safely, please delete /etc/amandates"
|
||||
fi
|
||||
|
||||
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
|
||||
# another host than HOSTNAME.
|
||||
if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
|
||||
elog "You are installing a client-only version of Amanda."
|
||||
elog "You should set the variable \$AMANDA_SERVER to point at your"
|
||||
elog "Amanda-tape-server, otherwise you will have to specify its name"
|
||||
elog "when using amrecover on the client."
|
||||
elog "For example: Use something like"
|
||||
elog "AMANDA_SERVER=\"myserver\" emerge amanda"
|
||||
elog
|
||||
fi
|
||||
|
||||
einfo "Checking setuid permissions"
|
||||
amanda_permissions_fix "${ROOT}"
|
||||
|
||||
elog "You should configure Amanda in /etc/amanda now."
|
||||
elog
|
||||
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
|
||||
elog "and restart xinetd afterwards!"
|
||||
elog
|
||||
elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
|
||||
elog "as an example of how to configure your inetd."
|
||||
elog
|
||||
elog "NOTICE: If you need raw access to partitions you need to add the"
|
||||
elog "amanda user to the 'disk' group."
|
||||
elog
|
||||
elog "NOTICE: If you have a tape changer, you need to add the amanda user"
|
||||
elog "to the 'tape' group."
|
||||
elog
|
||||
elog "If you use localhost in your disklist your restores may break."
|
||||
elog "You should replace it with the actual hostname!"
|
||||
elog "Please also see the syntax changes to amandahosts."
|
||||
}
|
||||
|
||||
# We have had reports of amanda file permissions getting screwed up.
|
||||
# Losing setuid, becoming too lax etc.
|
||||
# ONLY root and users in the amanda group should be able to run these binaries!
|
||||
amanda_permissions_fix() {
|
||||
local root="$1"
|
||||
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
|
||||
local le="/usr/libexec/amanda"
|
||||
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
|
||||
"${le}"/rundump "${le}"/runtar "${le}"/dumper \
|
||||
"${le}"/planner ; do
|
||||
chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
|
||||
chmod u=srwx,g=rx,o= "${root}"/${i}
|
||||
done
|
||||
}
|
@ -1,462 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.2.1.ebuild,v 1.17 2013/02/26 23:00:38 robbat2 Exp $
|
||||
|
||||
EAPI=3
|
||||
inherit autotools eutils perl-module user
|
||||
|
||||
MY_P="${P/_}"
|
||||
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
|
||||
HOMEPAGE="http://www.amanda.org/"
|
||||
SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
|
||||
LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc ppc64 ~sparc x86"
|
||||
RDEPEND="sys-libs/readline
|
||||
virtual/inetd
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
>=dev-lang/perl-5.6
|
||||
app-arch/dump
|
||||
net-misc/openssh
|
||||
>=dev-libs/glib-2.26.0
|
||||
nls? ( virtual/libintl )
|
||||
s3? ( >=net-misc/curl-7.10.0 )
|
||||
!s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
|
||||
samba? ( net-fs/samba )
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
xfs? ( sys-fs/xfsdump )
|
||||
readline? ( sys-libs/readline )
|
||||
!minimal? (
|
||||
virtual/mailx
|
||||
app-arch/mt-st
|
||||
sys-block/mtx
|
||||
gnuplot? ( sci-visualization/gnuplot )
|
||||
app-crypt/aespipe
|
||||
app-crypt/gnupg
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
>=app-text/docbook-xsl-stylesheets-1.72.0
|
||||
app-text/docbook-xml-dtd
|
||||
dev-libs/libxslt
|
||||
"
|
||||
|
||||
IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba xfs"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
MYFILESDIR="${T}/files"
|
||||
ENVDIR="/etc/env.d"
|
||||
ENVDFILE="97amanda"
|
||||
TMPENVFILE="${T}/${ENVDFILE}"
|
||||
|
||||
# This is a complete list of Amanda settings that the ebuild takes from the
|
||||
# build environment. This allows users to alter the behavior of the package as
|
||||
# upstream intended, but keeping with Gentoo style. We store a copy of them in
|
||||
# /etc/env.d/97amanda during the install, so that they are preserved for future
|
||||
# installed. This variable name must not start with AMANDA_, as we do not want
|
||||
# it captured into the env file.
|
||||
ENV_SETTINGS_AMANDA="
|
||||
AMANDA_GROUP_GID AMANDA_GROUP_NAME
|
||||
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
|
||||
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
|
||||
AMANDA_TAR_LISTDIR AMANDA_TAR
|
||||
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
|
||||
AMANDA_CONFIG_NAME AMANDA_TMPDIR"
|
||||
|
||||
amanda_variable_setup() {
|
||||
|
||||
# Setting vars
|
||||
local currentamanda
|
||||
|
||||
# Grab the current settings
|
||||
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
|
||||
|
||||
# First we set the defaults
|
||||
[ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
|
||||
[ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
|
||||
[ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
|
||||
[ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
|
||||
[ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash
|
||||
[ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
|
||||
[ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
|
||||
|
||||
# This installs Amanda, with the server. However, it could be a client,
|
||||
# just specify an alternate server name in AMANDA_SERVER.
|
||||
[ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
|
||||
[ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
|
||||
[ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
|
||||
[ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
|
||||
[ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
|
||||
# These are left empty by default
|
||||
[ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
|
||||
[ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
|
||||
[ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
|
||||
[ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
|
||||
|
||||
# What tar to use
|
||||
[ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
|
||||
|
||||
# Now pull in the old stuff
|
||||
if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then
|
||||
# We don't just source it as we don't want everything in there.
|
||||
eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
|
||||
fi
|
||||
|
||||
# Re-apply the new settings if any
|
||||
[ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
|
||||
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
amanda_variable_setup
|
||||
|
||||
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
|
||||
# another host than HOSTNAME.
|
||||
if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
|
||||
elog "You are installing a client-only version of Amanda."
|
||||
elog "You should set the variable \$AMANDA_SERVER to point at your"
|
||||
elog "Amanda-tape-server, otherwise you will have to specify its name"
|
||||
elog "when using amrecover on the client."
|
||||
elog "For example: Use something like"
|
||||
elog "AMANDA_SERVER=\"myserver\" emerge amanda"
|
||||
elog
|
||||
fi
|
||||
|
||||
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
|
||||
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# we do not want the perl src_unpack
|
||||
base_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Fix a fun race condition if you use encryption.
|
||||
# This is one of the reasons you should test your recovery procedures often.
|
||||
#epatch "${FILESDIR}"/${PN}-2.6.0p2-amcrypt-ossl-asym-race-fix.patch
|
||||
|
||||
# gentoo bug 248838, check /sbin stuff before /bin
|
||||
#epatch "${FILESDIR}"/${PN}-2.6.0_p2-syslocpath.patch
|
||||
|
||||
# gentoo bug #331111
|
||||
sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am
|
||||
sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am
|
||||
|
||||
eautoreconf
|
||||
|
||||
# places for us to work in
|
||||
mkdir -p "${MYFILESDIR}"
|
||||
# Now we store the settings we just created
|
||||
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
|
||||
|
||||
# Prepare our custom files
|
||||
einfo "Building custom configuration files"
|
||||
local i # our iterator
|
||||
local sedexpr # var for sed expr
|
||||
sedexpr=''
|
||||
for i in ${ENV_SETTINGS_AMANDA} ; do
|
||||
local val
|
||||
eval "val=\"\${${i}}\""
|
||||
sedexpr="${sedexpr}s|__${i}__|${val}|g;"
|
||||
done
|
||||
|
||||
# now apply the sed expr
|
||||
for i in "${FILESDIR}"/amanda-* ; do
|
||||
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`"
|
||||
done
|
||||
|
||||
(
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1
|
||||
use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1
|
||||
) > "${T}"/amandahosts
|
||||
|
||||
if ! use minimal; then
|
||||
sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
|
||||
server-src/am{addclient,serverconfig}.pl || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
local myconf
|
||||
|
||||
einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
|
||||
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
|
||||
einfo "Using ${AMANDA_SERVER_INDEX} for index server."
|
||||
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
|
||||
einfo "Using ${AMANDA_USER_NAME} for amanda user."
|
||||
myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
|
||||
einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
|
||||
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
|
||||
einfo "Using ${AMANDA_TAR} as Tar implementation."
|
||||
myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
|
||||
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
|
||||
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
|
||||
einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
|
||||
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
|
||||
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
|
||||
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
|
||||
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
|
||||
eerror "If you want _both_ UDP and TCP ports, please use only the"
|
||||
eerror "AMANDA_PORTS environment variable for identical ports, or set"
|
||||
eerror "AMANDA_PORTS_BOTH."
|
||||
die "Bad port setup!"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ]; then
|
||||
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
|
||||
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_TCP}" ]; then
|
||||
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
|
||||
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS}" ]; then
|
||||
einfo "Using ports ${AMANDA_PORTS/,/-}"
|
||||
myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
|
||||
fi
|
||||
|
||||
# Extras
|
||||
# Speed option
|
||||
myconf="${myconf} --with-buffered-dump"
|
||||
# "debugging" in the configuration is NOT debug in the conventional sense.
|
||||
# It is actually just useful output in the application, and should remain
|
||||
# enabled. There are some cases of breakage with MTX tape changers as of
|
||||
# 2.5.1p2 that it exposes when turned off as well.
|
||||
myconf="${myconf} --with-debugging"
|
||||
# Where to put our files
|
||||
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
|
||||
|
||||
# Samba support
|
||||
myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
|
||||
|
||||
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
|
||||
# default
|
||||
myconf="${myconf} --with-bsd-security"
|
||||
myconf="${myconf} --with-ssh-security"
|
||||
myconf="${myconf} --with-bsdudp-security"
|
||||
myconf="${myconf} --with-bsdtcp-security"
|
||||
|
||||
# kerberos-security mechanism version 5
|
||||
myconf="${myconf} `use_with kerberos krb5-security`"
|
||||
|
||||
# Amazon S3 support
|
||||
myconf="${myconf} `use_enable s3 s3-device`"
|
||||
|
||||
# libcurl is required for S3 but otherwise optional
|
||||
if ! use s3; then
|
||||
myconf="${myconf} $(use_with curl libcurl)"
|
||||
fi
|
||||
|
||||
# Client only, as requested in bug #127725
|
||||
if use minimal ; then
|
||||
myconf="${myconf} --without-server"
|
||||
else
|
||||
# amplot
|
||||
myconf="${myconf} $(use_with gnuplot)"
|
||||
fi
|
||||
|
||||
# IPv6 fun.
|
||||
myconf="${myconf} `use_with ipv6`"
|
||||
# This is to prevent the IPv6-is-working test
|
||||
# As the test fails on binpkg build hosts with no IPv6.
|
||||
use ipv6 && export amanda_cv_working_ipv6=yes
|
||||
|
||||
# I18N
|
||||
myconf="${myconf} `use_enable nls`"
|
||||
|
||||
# Bug #296634: Perl location
|
||||
perlinfo
|
||||
myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
|
||||
|
||||
# Bug 296633: --disable-syntax-checks
|
||||
# Some tests are not safe for production systems
|
||||
myconf="${myconf} --disable-syntax-checks"
|
||||
|
||||
# build manpages
|
||||
myconf="${myconf} --enable-manpage-build"
|
||||
|
||||
econf \
|
||||
$(use_with readline) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Again, do not want the perl-module src_compile
|
||||
base_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source ${TMPENVFILE}
|
||||
|
||||
einfo "Doing stock install"
|
||||
# parallel make install b0rked
|
||||
emake -j1 DESTDIR="${D}" install || die
|
||||
|
||||
# Build the envdir file
|
||||
# Don't forget this..
|
||||
einfo "Building environment file"
|
||||
(
|
||||
echo "# These settings are what was present in the environment when this"
|
||||
echo "# Amanda was compiled. Changing anything below this comment will"
|
||||
echo "# have no effect on your application, but it merely exists to"
|
||||
echo "# preserve them for your next emerge of Amanda"
|
||||
cat "${TMPENVFILE}" | sed "s,=\$,='',g"
|
||||
) >> "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Env.d
|
||||
einfo "Installing environment config file"
|
||||
doenvd "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Lock down next section (up until docs).
|
||||
insopts -m0640
|
||||
# Installing Amanda Xinetd Services Definition
|
||||
einfo "Installing xinetd service file"
|
||||
insinto /etc/xinetd.d
|
||||
if use minimal ; then
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
|
||||
else
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
|
||||
fi
|
||||
|
||||
if ! use minimal; then
|
||||
einfo "Installing Sample Daily Cron Job for Amanda"
|
||||
insinto /etc/cron.daily
|
||||
newins "${MYFILESDIR}/amanda-cron" amanda
|
||||
fi
|
||||
|
||||
insinto /etc/amanda
|
||||
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
|
||||
doins "${T}/amandahosts"
|
||||
fperms 600 /etc/amanda/amandahosts
|
||||
|
||||
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
|
||||
insinto "${AMANDA_USER_HOMEDIR}"
|
||||
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
|
||||
newins "${MYFILESDIR}/amanda-profile" .profile
|
||||
|
||||
insinto /etc/amanda
|
||||
doins "${S}/example/amanda-client.conf"
|
||||
if ! use minimal ; then
|
||||
insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
|
||||
doins "${S}/example/amanda.conf"
|
||||
doins "${S}/example/disklist"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
|
||||
fi
|
||||
|
||||
keepdir "${AMANDA_TAR_LISTDIR}"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/amanda"
|
||||
keepdir "${AMANDA_TMPDIR}/dumps"
|
||||
# Just make sure it exists for XFS to work...
|
||||
use xfs && keepdir /var/xfsdump/inventory
|
||||
|
||||
local i
|
||||
for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" /etc/amanda; do
|
||||
einfo "Securing directory (${i})"
|
||||
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
|
||||
done
|
||||
# Do NOT use -R
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
|
||||
"${AMANDA_USER_HOMEDIR}/amanda" \
|
||||
"${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
|
||||
/etc/amanda /etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
|
||||
einfo "Setting setuid permissions"
|
||||
amanda_permissions_fix "${D}"
|
||||
|
||||
# Relax permissions again
|
||||
insopts -m0644
|
||||
|
||||
# docs
|
||||
einfo "Installing documentation"
|
||||
dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
|
||||
# our inetd sample
|
||||
einfo "Installing standard inetd sample"
|
||||
newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
|
||||
# Amanda example configs
|
||||
einfo "Installing example configurations"
|
||||
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
|
||||
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
|
||||
docinto example1
|
||||
newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
|
||||
newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
|
||||
newdoc "${FILESDIR}/example_global.conf" global.conf
|
||||
|
||||
einfo "Cleaning up dud .la files"
|
||||
perlinfo
|
||||
find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[ ! -f "${TMPENVFILE}" -a "$EMERGE_FROM" == "binary" ] && \
|
||||
TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
||||
# Migration of amandates from /etc to $localstatedir/amanda
|
||||
if [ -f "${ROOT}/etc/amandates" -a \
|
||||
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
|
||||
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
|
||||
einfo "A backup is also placed at /etc/amandates.orig"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
|
||||
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
|
||||
fi
|
||||
if [ -f "${ROOT}/etc/amandates" ]; then
|
||||
einfo "If you have migrated safely, please delete /etc/amandates"
|
||||
fi
|
||||
|
||||
einfo "Checking setuid permissions"
|
||||
amanda_permissions_fix "${ROOT}"
|
||||
|
||||
elog "You should configure Amanda in /etc/amanda now."
|
||||
elog
|
||||
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
|
||||
elog "and restart xinetd afterwards!"
|
||||
elog
|
||||
elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
|
||||
elog "as an example of how to configure your inetd."
|
||||
elog
|
||||
elog "NOTICE: If you need raw access to partitions you need to add the"
|
||||
elog "amanda user to the 'disk' group."
|
||||
elog
|
||||
elog "NOTICE: If you have a tape changer, you need to add the amanda user"
|
||||
elog "to the 'tape' group."
|
||||
elog
|
||||
elog "If you use localhost in your disklist your restores may break."
|
||||
elog "You should replace it with the actual hostname!"
|
||||
elog "Please also see the syntax changes to amandahosts."
|
||||
}
|
||||
|
||||
# We have had reports of amanda file permissions getting screwed up.
|
||||
# Losing setuid, becoming too lax etc.
|
||||
# ONLY root and users in the amanda group should be able to run these binaries!
|
||||
amanda_permissions_fix() {
|
||||
local root="$1"
|
||||
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
|
||||
local le="/usr/libexec/amanda"
|
||||
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
|
||||
"${le}"/rundump "${le}"/runtar "${le}"/dumper \
|
||||
"${le}"/planner ; do
|
||||
chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
|
||||
chmod u=srwx,g=rx,o= "${root}"/${i}
|
||||
done
|
||||
}
|
@ -1,462 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.2.2.ebuild,v 1.8 2013/02/26 23:00:38 robbat2 Exp $
|
||||
|
||||
EAPI=3
|
||||
inherit autotools eutils perl-module user
|
||||
|
||||
MY_P="${P/_}"
|
||||
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
|
||||
HOMEPAGE="http://www.amanda.org/"
|
||||
SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
|
||||
LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="sys-libs/readline
|
||||
virtual/inetd
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
>=dev-lang/perl-5.6
|
||||
app-arch/dump
|
||||
net-misc/openssh
|
||||
>=dev-libs/glib-2.26.0
|
||||
nls? ( virtual/libintl )
|
||||
s3? ( >=net-misc/curl-7.10.0 )
|
||||
!s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
|
||||
samba? ( net-fs/samba )
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
xfs? ( sys-fs/xfsdump )
|
||||
readline? ( sys-libs/readline )
|
||||
!minimal? (
|
||||
virtual/mailx
|
||||
app-arch/mt-st
|
||||
sys-block/mtx
|
||||
gnuplot? ( sci-visualization/gnuplot )
|
||||
app-crypt/aespipe
|
||||
app-crypt/gnupg
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
>=app-text/docbook-xsl-stylesheets-1.72.0
|
||||
app-text/docbook-xml-dtd
|
||||
dev-libs/libxslt
|
||||
"
|
||||
|
||||
IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba xfs"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
MYFILESDIR="${T}/files"
|
||||
ENVDIR="/etc/env.d"
|
||||
ENVDFILE="97amanda"
|
||||
TMPENVFILE="${T}/${ENVDFILE}"
|
||||
|
||||
# This is a complete list of Amanda settings that the ebuild takes from the
|
||||
# build environment. This allows users to alter the behavior of the package as
|
||||
# upstream intended, but keeping with Gentoo style. We store a copy of them in
|
||||
# /etc/env.d/97amanda during the install, so that they are preserved for future
|
||||
# installed. This variable name must not start with AMANDA_, as we do not want
|
||||
# it captured into the env file.
|
||||
ENV_SETTINGS_AMANDA="
|
||||
AMANDA_GROUP_GID AMANDA_GROUP_NAME
|
||||
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
|
||||
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
|
||||
AMANDA_TAR_LISTDIR AMANDA_TAR
|
||||
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
|
||||
AMANDA_CONFIG_NAME AMANDA_TMPDIR"
|
||||
|
||||
amanda_variable_setup() {
|
||||
|
||||
# Setting vars
|
||||
local currentamanda
|
||||
|
||||
# Grab the current settings
|
||||
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
|
||||
|
||||
# First we set the defaults
|
||||
[ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
|
||||
[ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
|
||||
[ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
|
||||
[ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
|
||||
[ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash
|
||||
[ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
|
||||
[ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
|
||||
|
||||
# This installs Amanda, with the server. However, it could be a client,
|
||||
# just specify an alternate server name in AMANDA_SERVER.
|
||||
[ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
|
||||
[ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
|
||||
[ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
|
||||
[ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
|
||||
[ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
|
||||
# These are left empty by default
|
||||
[ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
|
||||
[ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
|
||||
[ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
|
||||
[ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
|
||||
|
||||
# What tar to use
|
||||
[ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
|
||||
|
||||
# Now pull in the old stuff
|
||||
if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then
|
||||
# We don't just source it as we don't want everything in there.
|
||||
eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
|
||||
fi
|
||||
|
||||
# Re-apply the new settings if any
|
||||
[ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
|
||||
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
amanda_variable_setup
|
||||
|
||||
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
|
||||
# another host than HOSTNAME.
|
||||
if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
|
||||
elog "You are installing a client-only version of Amanda."
|
||||
elog "You should set the variable \$AMANDA_SERVER to point at your"
|
||||
elog "Amanda-tape-server, otherwise you will have to specify its name"
|
||||
elog "when using amrecover on the client."
|
||||
elog "For example: Use something like"
|
||||
elog "AMANDA_SERVER=\"myserver\" emerge amanda"
|
||||
elog
|
||||
fi
|
||||
|
||||
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
|
||||
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# we do not want the perl src_unpack
|
||||
base_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Fix a fun race condition if you use encryption.
|
||||
# This is one of the reasons you should test your recovery procedures often.
|
||||
#epatch "${FILESDIR}"/${PN}-2.6.0p2-amcrypt-ossl-asym-race-fix.patch
|
||||
|
||||
# gentoo bug 248838, check /sbin stuff before /bin
|
||||
#epatch "${FILESDIR}"/${PN}-2.6.0_p2-syslocpath.patch
|
||||
|
||||
# gentoo bug #331111
|
||||
sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am
|
||||
sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am
|
||||
|
||||
eautoreconf
|
||||
|
||||
# places for us to work in
|
||||
mkdir -p "${MYFILESDIR}"
|
||||
# Now we store the settings we just created
|
||||
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
|
||||
|
||||
# Prepare our custom files
|
||||
einfo "Building custom configuration files"
|
||||
local i # our iterator
|
||||
local sedexpr # var for sed expr
|
||||
sedexpr=''
|
||||
for i in ${ENV_SETTINGS_AMANDA} ; do
|
||||
local val
|
||||
eval "val=\"\${${i}}\""
|
||||
sedexpr="${sedexpr}s|__${i}__|${val}|g;"
|
||||
done
|
||||
|
||||
# now apply the sed expr
|
||||
for i in "${FILESDIR}"/amanda-* ; do
|
||||
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`"
|
||||
done
|
||||
|
||||
(
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1
|
||||
use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1
|
||||
) > "${T}"/amandahosts
|
||||
|
||||
if ! use minimal; then
|
||||
sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
|
||||
server-src/am{addclient,serverconfig}.pl || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
local myconf
|
||||
|
||||
einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
|
||||
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
|
||||
einfo "Using ${AMANDA_SERVER_INDEX} for index server."
|
||||
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
|
||||
einfo "Using ${AMANDA_USER_NAME} for amanda user."
|
||||
myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
|
||||
einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
|
||||
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
|
||||
einfo "Using ${AMANDA_TAR} as Tar implementation."
|
||||
myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
|
||||
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
|
||||
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
|
||||
einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
|
||||
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
|
||||
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
|
||||
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
|
||||
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
|
||||
eerror "If you want _both_ UDP and TCP ports, please use only the"
|
||||
eerror "AMANDA_PORTS environment variable for identical ports, or set"
|
||||
eerror "AMANDA_PORTS_BOTH."
|
||||
die "Bad port setup!"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ]; then
|
||||
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
|
||||
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_TCP}" ]; then
|
||||
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
|
||||
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS}" ]; then
|
||||
einfo "Using ports ${AMANDA_PORTS/,/-}"
|
||||
myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
|
||||
fi
|
||||
|
||||
# Extras
|
||||
# Speed option
|
||||
myconf="${myconf} --with-buffered-dump"
|
||||
# "debugging" in the configuration is NOT debug in the conventional sense.
|
||||
# It is actually just useful output in the application, and should remain
|
||||
# enabled. There are some cases of breakage with MTX tape changers as of
|
||||
# 2.5.1p2 that it exposes when turned off as well.
|
||||
myconf="${myconf} --with-debugging"
|
||||
# Where to put our files
|
||||
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
|
||||
|
||||
# Samba support
|
||||
myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
|
||||
|
||||
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
|
||||
# default
|
||||
myconf="${myconf} --with-bsd-security"
|
||||
myconf="${myconf} --with-ssh-security"
|
||||
myconf="${myconf} --with-bsdudp-security"
|
||||
myconf="${myconf} --with-bsdtcp-security"
|
||||
|
||||
# kerberos-security mechanism version 5
|
||||
myconf="${myconf} `use_with kerberos krb5-security`"
|
||||
|
||||
# Amazon S3 support
|
||||
myconf="${myconf} `use_enable s3 s3-device`"
|
||||
|
||||
# libcurl is required for S3 but otherwise optional
|
||||
if ! use s3; then
|
||||
myconf="${myconf} $(use_with curl libcurl)"
|
||||
fi
|
||||
|
||||
# Client only, as requested in bug #127725
|
||||
if use minimal ; then
|
||||
myconf="${myconf} --without-server"
|
||||
else
|
||||
# amplot
|
||||
myconf="${myconf} $(use_with gnuplot)"
|
||||
fi
|
||||
|
||||
# IPv6 fun.
|
||||
myconf="${myconf} `use_with ipv6`"
|
||||
# This is to prevent the IPv6-is-working test
|
||||
# As the test fails on binpkg build hosts with no IPv6.
|
||||
use ipv6 && export amanda_cv_working_ipv6=yes
|
||||
|
||||
# I18N
|
||||
myconf="${myconf} `use_enable nls`"
|
||||
|
||||
# Bug #296634: Perl location
|
||||
perlinfo
|
||||
myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
|
||||
|
||||
# Bug 296633: --disable-syntax-checks
|
||||
# Some tests are not safe for production systems
|
||||
myconf="${myconf} --disable-syntax-checks"
|
||||
|
||||
# build manpages
|
||||
myconf="${myconf} --enable-manpage-build"
|
||||
|
||||
econf \
|
||||
$(use_with readline) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Again, do not want the perl-module src_compile
|
||||
base_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source ${TMPENVFILE}
|
||||
|
||||
einfo "Doing stock install"
|
||||
# parallel make install b0rked
|
||||
emake -j1 DESTDIR="${D}" install || die
|
||||
|
||||
# Build the envdir file
|
||||
# Don't forget this..
|
||||
einfo "Building environment file"
|
||||
(
|
||||
echo "# These settings are what was present in the environment when this"
|
||||
echo "# Amanda was compiled. Changing anything below this comment will"
|
||||
echo "# have no effect on your application, but it merely exists to"
|
||||
echo "# preserve them for your next emerge of Amanda"
|
||||
cat "${TMPENVFILE}" | sed "s,=\$,='',g"
|
||||
) >> "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Env.d
|
||||
einfo "Installing environment config file"
|
||||
doenvd "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Lock down next section (up until docs).
|
||||
insopts -m0640
|
||||
# Installing Amanda Xinetd Services Definition
|
||||
einfo "Installing xinetd service file"
|
||||
insinto /etc/xinetd.d
|
||||
if use minimal ; then
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
|
||||
else
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
|
||||
fi
|
||||
|
||||
if ! use minimal; then
|
||||
einfo "Installing Sample Daily Cron Job for Amanda"
|
||||
insinto /etc/cron.daily
|
||||
newins "${MYFILESDIR}/amanda-cron" amanda
|
||||
fi
|
||||
|
||||
insinto /etc/amanda
|
||||
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
|
||||
doins "${T}/amandahosts"
|
||||
fperms 600 /etc/amanda/amandahosts
|
||||
|
||||
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
|
||||
insinto "${AMANDA_USER_HOMEDIR}"
|
||||
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
|
||||
newins "${MYFILESDIR}/amanda-profile" .profile
|
||||
|
||||
insinto /etc/amanda
|
||||
doins "${S}/example/amanda-client.conf"
|
||||
if ! use minimal ; then
|
||||
insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
|
||||
doins "${S}/example/amanda.conf"
|
||||
doins "${S}/example/disklist"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
|
||||
fi
|
||||
|
||||
keepdir "${AMANDA_TAR_LISTDIR}"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/amanda"
|
||||
keepdir "${AMANDA_TMPDIR}/dumps"
|
||||
# Just make sure it exists for XFS to work...
|
||||
use xfs && keepdir /var/xfsdump/inventory
|
||||
|
||||
local i
|
||||
for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" /etc/amanda; do
|
||||
einfo "Securing directory (${i})"
|
||||
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
|
||||
done
|
||||
# Do NOT use -R
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
|
||||
"${AMANDA_USER_HOMEDIR}/amanda" \
|
||||
"${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
|
||||
/etc/amanda /etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
|
||||
einfo "Setting setuid permissions"
|
||||
amanda_permissions_fix "${D}"
|
||||
|
||||
# Relax permissions again
|
||||
insopts -m0644
|
||||
|
||||
# docs
|
||||
einfo "Installing documentation"
|
||||
dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
|
||||
# our inetd sample
|
||||
einfo "Installing standard inetd sample"
|
||||
newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
|
||||
# Amanda example configs
|
||||
einfo "Installing example configurations"
|
||||
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
|
||||
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
|
||||
docinto example1
|
||||
newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
|
||||
newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
|
||||
newdoc "${FILESDIR}/example_global.conf" global.conf
|
||||
|
||||
einfo "Cleaning up dud .la files"
|
||||
perlinfo
|
||||
find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[ ! -f "${TMPENVFILE}" -a "$EMERGE_FROM" == "binary" ] && \
|
||||
TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
||||
# Migration of amandates from /etc to $localstatedir/amanda
|
||||
if [ -f "${ROOT}/etc/amandates" -a \
|
||||
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
|
||||
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
|
||||
einfo "A backup is also placed at /etc/amandates.orig"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
|
||||
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
|
||||
fi
|
||||
if [ -f "${ROOT}/etc/amandates" ]; then
|
||||
einfo "If you have migrated safely, please delete /etc/amandates"
|
||||
fi
|
||||
|
||||
einfo "Checking setuid permissions"
|
||||
amanda_permissions_fix "${ROOT}"
|
||||
|
||||
elog "You should configure Amanda in /etc/amanda now."
|
||||
elog
|
||||
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
|
||||
elog "and restart xinetd afterwards!"
|
||||
elog
|
||||
elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
|
||||
elog "as an example of how to configure your inetd."
|
||||
elog
|
||||
elog "NOTICE: If you need raw access to partitions you need to add the"
|
||||
elog "amanda user to the 'disk' group."
|
||||
elog
|
||||
elog "NOTICE: If you have a tape changer, you need to add the amanda user"
|
||||
elog "to the 'tape' group."
|
||||
elog
|
||||
elog "If you use localhost in your disklist your restores may break."
|
||||
elog "You should replace it with the actual hostname!"
|
||||
elog "Please also see the syntax changes to amandahosts."
|
||||
}
|
||||
|
||||
# We have had reports of amanda file permissions getting screwed up.
|
||||
# Losing setuid, becoming too lax etc.
|
||||
# ONLY root and users in the amanda group should be able to run these binaries!
|
||||
amanda_permissions_fix() {
|
||||
local root="$1"
|
||||
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
|
||||
local le="/usr/libexec/amanda"
|
||||
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
|
||||
"${le}"/rundump "${le}"/runtar "${le}"/dumper \
|
||||
"${le}"/planner ; do
|
||||
chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
|
||||
chmod u=srwx,g=rx,o= "${root}"/${i}
|
||||
done
|
||||
}
|
@ -1,462 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.2.3.ebuild,v 1.2 2013/02/26 23:00:38 robbat2 Exp $
|
||||
|
||||
EAPI=3
|
||||
inherit autotools eutils perl-module user
|
||||
|
||||
MY_P="${P/_}"
|
||||
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
|
||||
HOMEPAGE="http://www.amanda.org/"
|
||||
SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
|
||||
LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="sys-libs/readline
|
||||
virtual/inetd
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
>=dev-lang/perl-5.6
|
||||
app-arch/dump
|
||||
net-misc/openssh
|
||||
>=dev-libs/glib-2.26.0
|
||||
nls? ( virtual/libintl )
|
||||
s3? ( >=net-misc/curl-7.10.0 )
|
||||
!s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
|
||||
samba? ( net-fs/samba )
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
xfs? ( sys-fs/xfsdump )
|
||||
readline? ( sys-libs/readline )
|
||||
!minimal? (
|
||||
virtual/mailx
|
||||
app-arch/mt-st
|
||||
sys-block/mtx
|
||||
gnuplot? ( sci-visualization/gnuplot )
|
||||
app-crypt/aespipe
|
||||
app-crypt/gnupg
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
>=app-text/docbook-xsl-stylesheets-1.72.0
|
||||
app-text/docbook-xml-dtd
|
||||
dev-libs/libxslt
|
||||
"
|
||||
|
||||
IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba xfs"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
MYFILESDIR="${T}/files"
|
||||
ENVDIR="/etc/env.d"
|
||||
ENVDFILE="97amanda"
|
||||
TMPENVFILE="${T}/${ENVDFILE}"
|
||||
|
||||
# This is a complete list of Amanda settings that the ebuild takes from the
|
||||
# build environment. This allows users to alter the behavior of the package as
|
||||
# upstream intended, but keeping with Gentoo style. We store a copy of them in
|
||||
# /etc/env.d/97amanda during the install, so that they are preserved for future
|
||||
# installed. This variable name must not start with AMANDA_, as we do not want
|
||||
# it captured into the env file.
|
||||
ENV_SETTINGS_AMANDA="
|
||||
AMANDA_GROUP_GID AMANDA_GROUP_NAME
|
||||
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
|
||||
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
|
||||
AMANDA_TAR_LISTDIR AMANDA_TAR
|
||||
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
|
||||
AMANDA_CONFIG_NAME AMANDA_TMPDIR"
|
||||
|
||||
amanda_variable_setup() {
|
||||
|
||||
# Setting vars
|
||||
local currentamanda
|
||||
|
||||
# Grab the current settings
|
||||
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
|
||||
|
||||
# First we set the defaults
|
||||
[ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
|
||||
[ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
|
||||
[ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
|
||||
[ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
|
||||
[ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash
|
||||
[ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
|
||||
[ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
|
||||
|
||||
# This installs Amanda, with the server. However, it could be a client,
|
||||
# just specify an alternate server name in AMANDA_SERVER.
|
||||
[ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
|
||||
[ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
|
||||
[ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
|
||||
[ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
|
||||
[ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
|
||||
# These are left empty by default
|
||||
[ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
|
||||
[ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
|
||||
[ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
|
||||
[ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
|
||||
|
||||
# What tar to use
|
||||
[ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
|
||||
|
||||
# Now pull in the old stuff
|
||||
if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then
|
||||
# We don't just source it as we don't want everything in there.
|
||||
eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
|
||||
fi
|
||||
|
||||
# Re-apply the new settings if any
|
||||
[ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
|
||||
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
amanda_variable_setup
|
||||
|
||||
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
|
||||
# another host than HOSTNAME.
|
||||
if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
|
||||
elog "You are installing a client-only version of Amanda."
|
||||
elog "You should set the variable \$AMANDA_SERVER to point at your"
|
||||
elog "Amanda-tape-server, otherwise you will have to specify its name"
|
||||
elog "when using amrecover on the client."
|
||||
elog "For example: Use something like"
|
||||
elog "AMANDA_SERVER=\"myserver\" emerge amanda"
|
||||
elog
|
||||
fi
|
||||
|
||||
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
|
||||
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# we do not want the perl src_unpack
|
||||
base_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Fix a fun race condition if you use encryption.
|
||||
# This is one of the reasons you should test your recovery procedures often.
|
||||
#epatch "${FILESDIR}"/${PN}-2.6.0p2-amcrypt-ossl-asym-race-fix.patch
|
||||
|
||||
# gentoo bug 248838, check /sbin stuff before /bin
|
||||
#epatch "${FILESDIR}"/${PN}-2.6.0_p2-syslocpath.patch
|
||||
|
||||
# gentoo bug #331111
|
||||
sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am
|
||||
sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am
|
||||
|
||||
eautoreconf
|
||||
|
||||
# places for us to work in
|
||||
mkdir -p "${MYFILESDIR}"
|
||||
# Now we store the settings we just created
|
||||
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
|
||||
|
||||
# Prepare our custom files
|
||||
einfo "Building custom configuration files"
|
||||
local i # our iterator
|
||||
local sedexpr # var for sed expr
|
||||
sedexpr=''
|
||||
for i in ${ENV_SETTINGS_AMANDA} ; do
|
||||
local val
|
||||
eval "val=\"\${${i}}\""
|
||||
sedexpr="${sedexpr}s|__${i}__|${val}|g;"
|
||||
done
|
||||
|
||||
# now apply the sed expr
|
||||
for i in "${FILESDIR}"/amanda-* ; do
|
||||
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`"
|
||||
done
|
||||
|
||||
(
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1
|
||||
use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1
|
||||
) > "${T}"/amandahosts
|
||||
|
||||
if ! use minimal; then
|
||||
sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
|
||||
server-src/am{addclient,serverconfig}.pl || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
local myconf
|
||||
|
||||
einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
|
||||
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
|
||||
einfo "Using ${AMANDA_SERVER_INDEX} for index server."
|
||||
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
|
||||
einfo "Using ${AMANDA_USER_NAME} for amanda user."
|
||||
myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
|
||||
einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
|
||||
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
|
||||
einfo "Using ${AMANDA_TAR} as Tar implementation."
|
||||
myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
|
||||
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
|
||||
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
|
||||
einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
|
||||
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
|
||||
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
|
||||
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
|
||||
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
|
||||
eerror "If you want _both_ UDP and TCP ports, please use only the"
|
||||
eerror "AMANDA_PORTS environment variable for identical ports, or set"
|
||||
eerror "AMANDA_PORTS_BOTH."
|
||||
die "Bad port setup!"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ]; then
|
||||
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
|
||||
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_TCP}" ]; then
|
||||
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
|
||||
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS}" ]; then
|
||||
einfo "Using ports ${AMANDA_PORTS/,/-}"
|
||||
myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
|
||||
fi
|
||||
|
||||
# Extras
|
||||
# Speed option
|
||||
myconf="${myconf} --with-buffered-dump"
|
||||
# "debugging" in the configuration is NOT debug in the conventional sense.
|
||||
# It is actually just useful output in the application, and should remain
|
||||
# enabled. There are some cases of breakage with MTX tape changers as of
|
||||
# 2.5.1p2 that it exposes when turned off as well.
|
||||
myconf="${myconf} --with-debugging"
|
||||
# Where to put our files
|
||||
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
|
||||
|
||||
# Samba support
|
||||
myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
|
||||
|
||||
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
|
||||
# default
|
||||
myconf="${myconf} --with-bsd-security"
|
||||
myconf="${myconf} --with-ssh-security"
|
||||
myconf="${myconf} --with-bsdudp-security"
|
||||
myconf="${myconf} --with-bsdtcp-security"
|
||||
|
||||
# kerberos-security mechanism version 5
|
||||
myconf="${myconf} `use_with kerberos krb5-security`"
|
||||
|
||||
# Amazon S3 support
|
||||
myconf="${myconf} `use_enable s3 s3-device`"
|
||||
|
||||
# libcurl is required for S3 but otherwise optional
|
||||
if ! use s3; then
|
||||
myconf="${myconf} $(use_with curl libcurl)"
|
||||
fi
|
||||
|
||||
# Client only, as requested in bug #127725
|
||||
if use minimal ; then
|
||||
myconf="${myconf} --without-server"
|
||||
else
|
||||
# amplot
|
||||
myconf="${myconf} $(use_with gnuplot)"
|
||||
fi
|
||||
|
||||
# IPv6 fun.
|
||||
myconf="${myconf} `use_with ipv6`"
|
||||
# This is to prevent the IPv6-is-working test
|
||||
# As the test fails on binpkg build hosts with no IPv6.
|
||||
use ipv6 && export amanda_cv_working_ipv6=yes
|
||||
|
||||
# I18N
|
||||
myconf="${myconf} `use_enable nls`"
|
||||
|
||||
# Bug #296634: Perl location
|
||||
perlinfo
|
||||
myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
|
||||
|
||||
# Bug 296633: --disable-syntax-checks
|
||||
# Some tests are not safe for production systems
|
||||
myconf="${myconf} --disable-syntax-checks"
|
||||
|
||||
# build manpages
|
||||
myconf="${myconf} --enable-manpage-build"
|
||||
|
||||
econf \
|
||||
$(use_with readline) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Again, do not want the perl-module src_compile
|
||||
base_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source ${TMPENVFILE}
|
||||
|
||||
einfo "Doing stock install"
|
||||
# parallel make install b0rked
|
||||
emake -j1 DESTDIR="${D}" install || die
|
||||
|
||||
# Build the envdir file
|
||||
# Don't forget this..
|
||||
einfo "Building environment file"
|
||||
(
|
||||
echo "# These settings are what was present in the environment when this"
|
||||
echo "# Amanda was compiled. Changing anything below this comment will"
|
||||
echo "# have no effect on your application, but it merely exists to"
|
||||
echo "# preserve them for your next emerge of Amanda"
|
||||
cat "${TMPENVFILE}" | sed "s,=\$,='',g"
|
||||
) >> "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Env.d
|
||||
einfo "Installing environment config file"
|
||||
doenvd "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Lock down next section (up until docs).
|
||||
insopts -m0640
|
||||
# Installing Amanda Xinetd Services Definition
|
||||
einfo "Installing xinetd service file"
|
||||
insinto /etc/xinetd.d
|
||||
if use minimal ; then
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
|
||||
else
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
|
||||
fi
|
||||
|
||||
if ! use minimal; then
|
||||
einfo "Installing Sample Daily Cron Job for Amanda"
|
||||
insinto /etc/cron.daily
|
||||
newins "${MYFILESDIR}/amanda-cron" amanda
|
||||
fi
|
||||
|
||||
insinto /etc/amanda
|
||||
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
|
||||
doins "${T}/amandahosts"
|
||||
fperms 600 /etc/amanda/amandahosts
|
||||
|
||||
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
|
||||
insinto "${AMANDA_USER_HOMEDIR}"
|
||||
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
|
||||
newins "${MYFILESDIR}/amanda-profile" .profile
|
||||
|
||||
insinto /etc/amanda
|
||||
doins "${S}/example/amanda-client.conf"
|
||||
if ! use minimal ; then
|
||||
insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
|
||||
doins "${S}/example/amanda.conf"
|
||||
doins "${S}/example/disklist"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
|
||||
fi
|
||||
|
||||
keepdir "${AMANDA_TAR_LISTDIR}"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/amanda"
|
||||
keepdir "${AMANDA_TMPDIR}/dumps"
|
||||
# Just make sure it exists for XFS to work...
|
||||
use xfs && keepdir /var/xfsdump/inventory
|
||||
|
||||
local i
|
||||
for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" /etc/amanda; do
|
||||
einfo "Securing directory (${i})"
|
||||
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
|
||||
done
|
||||
# Do NOT use -R
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
|
||||
"${AMANDA_USER_HOMEDIR}/amanda" \
|
||||
"${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
|
||||
/etc/amanda /etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
|
||||
einfo "Setting setuid permissions"
|
||||
amanda_permissions_fix "${D}"
|
||||
|
||||
# Relax permissions again
|
||||
insopts -m0644
|
||||
|
||||
# docs
|
||||
einfo "Installing documentation"
|
||||
dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
|
||||
# our inetd sample
|
||||
einfo "Installing standard inetd sample"
|
||||
newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
|
||||
# Amanda example configs
|
||||
einfo "Installing example configurations"
|
||||
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
|
||||
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
|
||||
docinto example1
|
||||
newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
|
||||
newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
|
||||
newdoc "${FILESDIR}/example_global.conf" global.conf
|
||||
|
||||
einfo "Cleaning up dud .la files"
|
||||
perlinfo
|
||||
find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[ ! -f "${TMPENVFILE}" -a "$EMERGE_FROM" == "binary" ] && \
|
||||
TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
||||
# Migration of amandates from /etc to $localstatedir/amanda
|
||||
if [ -f "${ROOT}/etc/amandates" -a \
|
||||
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
|
||||
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
|
||||
einfo "A backup is also placed at /etc/amandates.orig"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
|
||||
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
|
||||
fi
|
||||
if [ -f "${ROOT}/etc/amandates" ]; then
|
||||
einfo "If you have migrated safely, please delete /etc/amandates"
|
||||
fi
|
||||
|
||||
einfo "Checking setuid permissions"
|
||||
amanda_permissions_fix "${ROOT}"
|
||||
|
||||
elog "You should configure Amanda in /etc/amanda now."
|
||||
elog
|
||||
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
|
||||
elog "and restart xinetd afterwards!"
|
||||
elog
|
||||
elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
|
||||
elog "as an example of how to configure your inetd."
|
||||
elog
|
||||
elog "NOTICE: If you need raw access to partitions you need to add the"
|
||||
elog "amanda user to the 'disk' group."
|
||||
elog
|
||||
elog "NOTICE: If you have a tape changer, you need to add the amanda user"
|
||||
elog "to the 'tape' group."
|
||||
elog
|
||||
elog "If you use localhost in your disklist your restores may break."
|
||||
elog "You should replace it with the actual hostname!"
|
||||
elog "Please also see the syntax changes to amandahosts."
|
||||
}
|
||||
|
||||
# We have had reports of amanda file permissions getting screwed up.
|
||||
# Losing setuid, becoming too lax etc.
|
||||
# ONLY root and users in the amanda group should be able to run these binaries!
|
||||
amanda_permissions_fix() {
|
||||
local root="$1"
|
||||
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
|
||||
local le="/usr/libexec/amanda"
|
||||
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
|
||||
"${le}"/rundump "${le}"/runtar "${le}"/dumper \
|
||||
"${le}"/planner ; do
|
||||
chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
|
||||
chmod u=srwx,g=rx,o= "${root}"/${i}
|
||||
done
|
||||
}
|
@ -1,462 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.0.ebuild,v 1.7 2013/02/26 23:00:38 robbat2 Exp $
|
||||
|
||||
EAPI=3
|
||||
inherit autotools eutils perl-module user
|
||||
|
||||
MY_P="${P/_}"
|
||||
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
|
||||
HOMEPAGE="http://www.amanda.org/"
|
||||
SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
|
||||
LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="sys-libs/readline
|
||||
virtual/inetd
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
>=dev-lang/perl-5.6
|
||||
app-arch/dump
|
||||
net-misc/openssh
|
||||
>=dev-libs/glib-2.26.0
|
||||
nls? ( virtual/libintl )
|
||||
s3? ( >=net-misc/curl-7.10.0 )
|
||||
!s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
|
||||
samba? ( net-fs/samba )
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
xfs? ( sys-fs/xfsdump )
|
||||
readline? ( sys-libs/readline )
|
||||
!minimal? (
|
||||
virtual/mailx
|
||||
app-arch/mt-st
|
||||
sys-block/mtx
|
||||
gnuplot? ( sci-visualization/gnuplot )
|
||||
app-crypt/aespipe
|
||||
app-crypt/gnupg
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
>=app-text/docbook-xsl-stylesheets-1.72.0
|
||||
app-text/docbook-xml-dtd
|
||||
dev-libs/libxslt
|
||||
"
|
||||
|
||||
IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba xfs"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
MYFILESDIR="${T}/files"
|
||||
ENVDIR="/etc/env.d"
|
||||
ENVDFILE="97amanda"
|
||||
TMPENVFILE="${T}/${ENVDFILE}"
|
||||
|
||||
# This is a complete list of Amanda settings that the ebuild takes from the
|
||||
# build environment. This allows users to alter the behavior of the package as
|
||||
# upstream intended, but keeping with Gentoo style. We store a copy of them in
|
||||
# /etc/env.d/97amanda during the install, so that they are preserved for future
|
||||
# installed. This variable name must not start with AMANDA_, as we do not want
|
||||
# it captured into the env file.
|
||||
ENV_SETTINGS_AMANDA="
|
||||
AMANDA_GROUP_GID AMANDA_GROUP_NAME
|
||||
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
|
||||
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
|
||||
AMANDA_TAR_LISTDIR AMANDA_TAR
|
||||
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
|
||||
AMANDA_CONFIG_NAME AMANDA_TMPDIR"
|
||||
|
||||
amanda_variable_setup() {
|
||||
|
||||
# Setting vars
|
||||
local currentamanda
|
||||
|
||||
# Grab the current settings
|
||||
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
|
||||
|
||||
# First we set the defaults
|
||||
[ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
|
||||
[ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
|
||||
[ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
|
||||
[ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
|
||||
[ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash
|
||||
[ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
|
||||
[ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
|
||||
|
||||
# This installs Amanda, with the server. However, it could be a client,
|
||||
# just specify an alternate server name in AMANDA_SERVER.
|
||||
[ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
|
||||
[ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
|
||||
[ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
|
||||
[ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
|
||||
[ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
|
||||
# These are left empty by default
|
||||
[ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
|
||||
[ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
|
||||
[ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
|
||||
[ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
|
||||
|
||||
# What tar to use
|
||||
[ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
|
||||
|
||||
# Now pull in the old stuff
|
||||
if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then
|
||||
# We don't just source it as we don't want everything in there.
|
||||
eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
|
||||
fi
|
||||
|
||||
# Re-apply the new settings if any
|
||||
[ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
|
||||
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
amanda_variable_setup
|
||||
|
||||
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
|
||||
# another host than HOSTNAME.
|
||||
if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
|
||||
elog "You are installing a client-only version of Amanda."
|
||||
elog "You should set the variable \$AMANDA_SERVER to point at your"
|
||||
elog "Amanda-tape-server, otherwise you will have to specify its name"
|
||||
elog "when using amrecover on the client."
|
||||
elog "For example: Use something like"
|
||||
elog "AMANDA_SERVER=\"myserver\" emerge amanda"
|
||||
elog
|
||||
fi
|
||||
|
||||
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
|
||||
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# we do not want the perl src_unpack
|
||||
base_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Fix a fun race condition if you use encryption.
|
||||
# This is one of the reasons you should test your recovery procedures often.
|
||||
#epatch "${FILESDIR}"/${PN}-2.6.0p2-amcrypt-ossl-asym-race-fix.patch
|
||||
|
||||
# gentoo bug 248838, check /sbin stuff before /bin
|
||||
#epatch "${FILESDIR}"/${PN}-2.6.0_p2-syslocpath.patch
|
||||
|
||||
# gentoo bug #331111
|
||||
sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am
|
||||
sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am
|
||||
|
||||
eautoreconf
|
||||
|
||||
# places for us to work in
|
||||
mkdir -p "${MYFILESDIR}"
|
||||
# Now we store the settings we just created
|
||||
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
|
||||
|
||||
# Prepare our custom files
|
||||
einfo "Building custom configuration files"
|
||||
local i # our iterator
|
||||
local sedexpr # var for sed expr
|
||||
sedexpr=''
|
||||
for i in ${ENV_SETTINGS_AMANDA} ; do
|
||||
local val
|
||||
eval "val=\"\${${i}}\""
|
||||
sedexpr="${sedexpr}s|__${i}__|${val}|g;"
|
||||
done
|
||||
|
||||
# now apply the sed expr
|
||||
for i in "${FILESDIR}"/amanda-* ; do
|
||||
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`"
|
||||
done
|
||||
|
||||
(
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1
|
||||
use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1
|
||||
) > "${T}"/amandahosts
|
||||
|
||||
if ! use minimal; then
|
||||
sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
|
||||
server-src/am{addclient,serverconfig}.pl || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
local myconf
|
||||
|
||||
einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
|
||||
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
|
||||
einfo "Using ${AMANDA_SERVER_INDEX} for index server."
|
||||
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
|
||||
einfo "Using ${AMANDA_USER_NAME} for amanda user."
|
||||
myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
|
||||
einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
|
||||
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
|
||||
einfo "Using ${AMANDA_TAR} as Tar implementation."
|
||||
myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
|
||||
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
|
||||
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
|
||||
einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
|
||||
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
|
||||
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
|
||||
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
|
||||
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
|
||||
eerror "If you want _both_ UDP and TCP ports, please use only the"
|
||||
eerror "AMANDA_PORTS environment variable for identical ports, or set"
|
||||
eerror "AMANDA_PORTS_BOTH."
|
||||
die "Bad port setup!"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ]; then
|
||||
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
|
||||
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_TCP}" ]; then
|
||||
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
|
||||
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS}" ]; then
|
||||
einfo "Using ports ${AMANDA_PORTS/,/-}"
|
||||
myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
|
||||
fi
|
||||
|
||||
# Extras
|
||||
# Speed option
|
||||
myconf="${myconf} --with-buffered-dump"
|
||||
# "debugging" in the configuration is NOT debug in the conventional sense.
|
||||
# It is actually just useful output in the application, and should remain
|
||||
# enabled. There are some cases of breakage with MTX tape changers as of
|
||||
# 2.5.1p2 that it exposes when turned off as well.
|
||||
myconf="${myconf} --with-debugging"
|
||||
# Where to put our files
|
||||
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
|
||||
|
||||
# Samba support
|
||||
myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
|
||||
|
||||
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
|
||||
# default
|
||||
myconf="${myconf} --with-bsd-security"
|
||||
myconf="${myconf} --with-ssh-security"
|
||||
myconf="${myconf} --with-bsdudp-security"
|
||||
myconf="${myconf} --with-bsdtcp-security"
|
||||
|
||||
# kerberos-security mechanism version 5
|
||||
myconf="${myconf} `use_with kerberos krb5-security`"
|
||||
|
||||
# Amazon S3 support
|
||||
myconf="${myconf} `use_enable s3 s3-device`"
|
||||
|
||||
# libcurl is required for S3 but otherwise optional
|
||||
if ! use s3; then
|
||||
myconf="${myconf} $(use_with curl libcurl)"
|
||||
fi
|
||||
|
||||
# Client only, as requested in bug #127725
|
||||
if use minimal ; then
|
||||
myconf="${myconf} --without-server"
|
||||
else
|
||||
# amplot
|
||||
myconf="${myconf} $(use_with gnuplot)"
|
||||
fi
|
||||
|
||||
# IPv6 fun.
|
||||
myconf="${myconf} `use_with ipv6`"
|
||||
# This is to prevent the IPv6-is-working test
|
||||
# As the test fails on binpkg build hosts with no IPv6.
|
||||
use ipv6 && export amanda_cv_working_ipv6=yes
|
||||
|
||||
# I18N
|
||||
myconf="${myconf} `use_enable nls`"
|
||||
|
||||
# Bug #296634: Perl location
|
||||
perlinfo
|
||||
myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
|
||||
|
||||
# Bug 296633: --disable-syntax-checks
|
||||
# Some tests are not safe for production systems
|
||||
myconf="${myconf} --disable-syntax-checks"
|
||||
|
||||
# build manpages
|
||||
myconf="${myconf} --enable-manpage-build"
|
||||
|
||||
econf \
|
||||
$(use_with readline) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Again, do not want the perl-module src_compile
|
||||
base_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source ${TMPENVFILE}
|
||||
|
||||
einfo "Doing stock install"
|
||||
# parallel make install b0rked
|
||||
emake -j1 DESTDIR="${D}" install || die
|
||||
|
||||
# Build the envdir file
|
||||
# Don't forget this..
|
||||
einfo "Building environment file"
|
||||
(
|
||||
echo "# These settings are what was present in the environment when this"
|
||||
echo "# Amanda was compiled. Changing anything below this comment will"
|
||||
echo "# have no effect on your application, but it merely exists to"
|
||||
echo "# preserve them for your next emerge of Amanda"
|
||||
cat "${TMPENVFILE}" | sed "s,=\$,='',g"
|
||||
) >> "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Env.d
|
||||
einfo "Installing environment config file"
|
||||
doenvd "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Lock down next section (up until docs).
|
||||
insopts -m0640
|
||||
# Installing Amanda Xinetd Services Definition
|
||||
einfo "Installing xinetd service file"
|
||||
insinto /etc/xinetd.d
|
||||
if use minimal ; then
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
|
||||
else
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
|
||||
fi
|
||||
|
||||
if ! use minimal; then
|
||||
einfo "Installing Sample Daily Cron Job for Amanda"
|
||||
insinto /etc/cron.daily
|
||||
newins "${MYFILESDIR}/amanda-cron" amanda
|
||||
fi
|
||||
|
||||
insinto /etc/amanda
|
||||
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
|
||||
doins "${T}/amandahosts"
|
||||
fperms 600 /etc/amanda/amandahosts
|
||||
|
||||
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
|
||||
insinto "${AMANDA_USER_HOMEDIR}"
|
||||
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
|
||||
newins "${MYFILESDIR}/amanda-profile" .profile
|
||||
|
||||
insinto /etc/amanda
|
||||
doins "${S}/example/amanda-client.conf"
|
||||
if ! use minimal ; then
|
||||
insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
|
||||
doins "${S}/example/amanda.conf"
|
||||
doins "${S}/example/disklist"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
|
||||
fi
|
||||
|
||||
keepdir "${AMANDA_TAR_LISTDIR}"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/amanda"
|
||||
keepdir "${AMANDA_TMPDIR}/dumps"
|
||||
# Just make sure it exists for XFS to work...
|
||||
use xfs && keepdir /var/xfsdump/inventory
|
||||
|
||||
local i
|
||||
for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" /etc/amanda; do
|
||||
einfo "Securing directory (${i})"
|
||||
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
|
||||
done
|
||||
# Do NOT use -R
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
|
||||
"${AMANDA_USER_HOMEDIR}/amanda" \
|
||||
"${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
|
||||
/etc/amanda /etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
|
||||
einfo "Setting setuid permissions"
|
||||
amanda_permissions_fix "${D}"
|
||||
|
||||
# Relax permissions again
|
||||
insopts -m0644
|
||||
|
||||
# docs
|
||||
einfo "Installing documentation"
|
||||
dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
|
||||
# our inetd sample
|
||||
einfo "Installing standard inetd sample"
|
||||
newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
|
||||
# Amanda example configs
|
||||
einfo "Installing example configurations"
|
||||
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
|
||||
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
|
||||
docinto example1
|
||||
newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
|
||||
newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
|
||||
newdoc "${FILESDIR}/example_global.conf" global.conf
|
||||
|
||||
einfo "Cleaning up dud .la files"
|
||||
perlinfo
|
||||
find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[ ! -f "${TMPENVFILE}" -a "$EMERGE_FROM" == "binary" ] && \
|
||||
TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
||||
# Migration of amandates from /etc to $localstatedir/amanda
|
||||
if [ -f "${ROOT}/etc/amandates" -a \
|
||||
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
|
||||
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
|
||||
einfo "A backup is also placed at /etc/amandates.orig"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
|
||||
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
|
||||
fi
|
||||
if [ -f "${ROOT}/etc/amandates" ]; then
|
||||
einfo "If you have migrated safely, please delete /etc/amandates"
|
||||
fi
|
||||
|
||||
einfo "Checking setuid permissions"
|
||||
amanda_permissions_fix "${ROOT}"
|
||||
|
||||
elog "You should configure Amanda in /etc/amanda now."
|
||||
elog
|
||||
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
|
||||
elog "and restart xinetd afterwards!"
|
||||
elog
|
||||
elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
|
||||
elog "as an example of how to configure your inetd."
|
||||
elog
|
||||
elog "NOTICE: If you need raw access to partitions you need to add the"
|
||||
elog "amanda user to the 'disk' group."
|
||||
elog
|
||||
elog "NOTICE: If you have a tape changer, you need to add the amanda user"
|
||||
elog "to the 'tape' group."
|
||||
elog
|
||||
elog "If you use localhost in your disklist your restores may break."
|
||||
elog "You should replace it with the actual hostname!"
|
||||
elog "Please also see the syntax changes to amandahosts."
|
||||
}
|
||||
|
||||
# We have had reports of amanda file permissions getting screwed up.
|
||||
# Losing setuid, becoming too lax etc.
|
||||
# ONLY root and users in the amanda group should be able to run these binaries!
|
||||
amanda_permissions_fix() {
|
||||
local root="$1"
|
||||
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
|
||||
local le="/usr/libexec/amanda"
|
||||
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
|
||||
"${le}"/rundump "${le}"/runtar "${le}"/dumper \
|
||||
"${le}"/planner ; do
|
||||
chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
|
||||
chmod u=srwx,g=rx,o= "${root}"/${i}
|
||||
done
|
||||
}
|
@ -1,467 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.1.ebuild,v 1.8 2013/02/26 23:00:38 robbat2 Exp $
|
||||
|
||||
EAPI=3
|
||||
inherit autotools eutils perl-module user
|
||||
|
||||
MY_P="${P/_}"
|
||||
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
|
||||
HOMEPAGE="http://www.amanda.org/"
|
||||
SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
|
||||
LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc ppc64 ~sparc x86"
|
||||
RDEPEND="sys-libs/readline
|
||||
virtual/inetd
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
>=dev-lang/perl-5.6
|
||||
app-arch/dump
|
||||
net-misc/openssh
|
||||
>=dev-libs/glib-2.26.0
|
||||
nls? ( virtual/libintl )
|
||||
s3? ( >=net-misc/curl-7.10.0 )
|
||||
!s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
|
||||
samba? ( net-fs/samba )
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
xfs? ( sys-fs/xfsdump )
|
||||
readline? ( sys-libs/readline )
|
||||
!minimal? (
|
||||
virtual/mailx
|
||||
app-arch/mt-st
|
||||
sys-block/mtx
|
||||
gnuplot? ( sci-visualization/gnuplot )
|
||||
app-crypt/aespipe
|
||||
app-crypt/gnupg
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
>=app-text/docbook-xsl-stylesheets-1.72.0
|
||||
app-text/docbook-xml-dtd
|
||||
dev-libs/libxslt
|
||||
"
|
||||
|
||||
IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba xfs"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
MYFILESDIR="${T}/files"
|
||||
ENVDIR="/etc/env.d"
|
||||
ENVDFILE="97amanda"
|
||||
TMPENVFILE="${T}/${ENVDFILE}"
|
||||
|
||||
# This is a complete list of Amanda settings that the ebuild takes from the
|
||||
# build environment. This allows users to alter the behavior of the package as
|
||||
# upstream intended, but keeping with Gentoo style. We store a copy of them in
|
||||
# /etc/env.d/97amanda during the install, so that they are preserved for future
|
||||
# installed. This variable name must not start with AMANDA_, as we do not want
|
||||
# it captured into the env file.
|
||||
ENV_SETTINGS_AMANDA="
|
||||
AMANDA_GROUP_GID AMANDA_GROUP_NAME
|
||||
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
|
||||
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
|
||||
AMANDA_TAR_LISTDIR AMANDA_TAR
|
||||
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
|
||||
AMANDA_CONFIG_NAME AMANDA_TMPDIR"
|
||||
|
||||
amanda_variable_setup() {
|
||||
|
||||
# Setting vars
|
||||
local currentamanda
|
||||
|
||||
# Grab the current settings
|
||||
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
|
||||
|
||||
# First we set the defaults
|
||||
[ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
|
||||
[ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
|
||||
[ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
|
||||
[ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
|
||||
[ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash
|
||||
[ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
|
||||
[ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
|
||||
|
||||
# This installs Amanda, with the server. However, it could be a client,
|
||||
# just specify an alternate server name in AMANDA_SERVER.
|
||||
[ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
|
||||
[ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
|
||||
[ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
|
||||
[ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
|
||||
[ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
|
||||
# These are left empty by default
|
||||
[ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
|
||||
[ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
|
||||
[ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
|
||||
[ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
|
||||
|
||||
# What tar to use
|
||||
[ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
|
||||
|
||||
# Now pull in the old stuff
|
||||
if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then
|
||||
# We don't just source it as we don't want everything in there.
|
||||
eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
|
||||
fi
|
||||
|
||||
# Re-apply the new settings if any
|
||||
[ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
|
||||
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
amanda_variable_setup
|
||||
|
||||
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
|
||||
# another host than HOSTNAME.
|
||||
if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
|
||||
elog "You are installing a client-only version of Amanda."
|
||||
elog "You should set the variable \$AMANDA_SERVER to point at your"
|
||||
elog "Amanda-tape-server, otherwise you will have to specify its name"
|
||||
elog "when using amrecover on the client."
|
||||
elog "For example: Use something like"
|
||||
elog "AMANDA_SERVER=\"myserver\" emerge amanda"
|
||||
elog
|
||||
fi
|
||||
|
||||
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
|
||||
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# we do not want the perl src_unpack
|
||||
base_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Fix a fun race condition if you use encryption.
|
||||
# This is one of the reasons you should test your recovery procedures often.
|
||||
#epatch "${FILESDIR}"/${PN}-2.6.0p2-amcrypt-ossl-asym-race-fix.patch
|
||||
|
||||
# gentoo bug 248838, check /sbin stuff before /bin
|
||||
#epatch "${FILESDIR}"/${PN}-2.6.0_p2-syslocpath.patch
|
||||
|
||||
# gentoo bug #415587
|
||||
epatch "${FILESDIR}"/amanda-r4593.patch
|
||||
epatch "${FILESDIR}"/amanda-r4595.patch
|
||||
epatch "${FILESDIR}"/amanda-r4698.patch
|
||||
|
||||
# gentoo bug #331111
|
||||
sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am
|
||||
sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am
|
||||
|
||||
eautoreconf
|
||||
|
||||
# places for us to work in
|
||||
mkdir -p "${MYFILESDIR}"
|
||||
# Now we store the settings we just created
|
||||
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
|
||||
|
||||
# Prepare our custom files
|
||||
einfo "Building custom configuration files"
|
||||
local i # our iterator
|
||||
local sedexpr # var for sed expr
|
||||
sedexpr=''
|
||||
for i in ${ENV_SETTINGS_AMANDA} ; do
|
||||
local val
|
||||
eval "val=\"\${${i}}\""
|
||||
sedexpr="${sedexpr}s|__${i}__|${val}|g;"
|
||||
done
|
||||
|
||||
# now apply the sed expr
|
||||
for i in "${FILESDIR}"/amanda-* ; do
|
||||
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`"
|
||||
done
|
||||
|
||||
(
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1
|
||||
use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1
|
||||
) > "${T}"/amandahosts
|
||||
|
||||
if ! use minimal; then
|
||||
sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
|
||||
server-src/am{addclient,serverconfig}.pl || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
local myconf
|
||||
|
||||
einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
|
||||
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
|
||||
einfo "Using ${AMANDA_SERVER_INDEX} for index server."
|
||||
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
|
||||
einfo "Using ${AMANDA_USER_NAME} for amanda user."
|
||||
myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
|
||||
einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
|
||||
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
|
||||
einfo "Using ${AMANDA_TAR} as Tar implementation."
|
||||
myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
|
||||
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
|
||||
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
|
||||
einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
|
||||
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
|
||||
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
|
||||
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
|
||||
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
|
||||
eerror "If you want _both_ UDP and TCP ports, please use only the"
|
||||
eerror "AMANDA_PORTS environment variable for identical ports, or set"
|
||||
eerror "AMANDA_PORTS_BOTH."
|
||||
die "Bad port setup!"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ]; then
|
||||
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
|
||||
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_TCP}" ]; then
|
||||
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
|
||||
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS}" ]; then
|
||||
einfo "Using ports ${AMANDA_PORTS/,/-}"
|
||||
myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
|
||||
fi
|
||||
|
||||
# Extras
|
||||
# Speed option
|
||||
myconf="${myconf} --with-buffered-dump"
|
||||
# "debugging" in the configuration is NOT debug in the conventional sense.
|
||||
# It is actually just useful output in the application, and should remain
|
||||
# enabled. There are some cases of breakage with MTX tape changers as of
|
||||
# 2.5.1p2 that it exposes when turned off as well.
|
||||
myconf="${myconf} --with-debugging"
|
||||
# Where to put our files
|
||||
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
|
||||
|
||||
# Samba support
|
||||
myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
|
||||
|
||||
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
|
||||
# default
|
||||
myconf="${myconf} --with-bsd-security"
|
||||
myconf="${myconf} --with-ssh-security"
|
||||
myconf="${myconf} --with-bsdudp-security"
|
||||
myconf="${myconf} --with-bsdtcp-security"
|
||||
|
||||
# kerberos-security mechanism version 5
|
||||
myconf="${myconf} `use_with kerberos krb5-security`"
|
||||
|
||||
# Amazon S3 support
|
||||
myconf="${myconf} `use_enable s3 s3-device`"
|
||||
|
||||
# libcurl is required for S3 but otherwise optional
|
||||
if ! use s3; then
|
||||
myconf="${myconf} $(use_with curl libcurl)"
|
||||
fi
|
||||
|
||||
# Client only, as requested in bug #127725
|
||||
if use minimal ; then
|
||||
myconf="${myconf} --without-server"
|
||||
else
|
||||
# amplot
|
||||
myconf="${myconf} $(use_with gnuplot)"
|
||||
fi
|
||||
|
||||
# IPv6 fun.
|
||||
myconf="${myconf} `use_with ipv6`"
|
||||
# This is to prevent the IPv6-is-working test
|
||||
# As the test fails on binpkg build hosts with no IPv6.
|
||||
use ipv6 && export amanda_cv_working_ipv6=yes
|
||||
|
||||
# I18N
|
||||
myconf="${myconf} `use_enable nls`"
|
||||
|
||||
# Bug #296634: Perl location
|
||||
perlinfo
|
||||
myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
|
||||
|
||||
# Bug 296633: --disable-syntax-checks
|
||||
# Some tests are not safe for production systems
|
||||
myconf="${myconf} --disable-syntax-checks"
|
||||
|
||||
# build manpages
|
||||
myconf="${myconf} --enable-manpage-build"
|
||||
|
||||
econf \
|
||||
$(use_with readline) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Again, do not want the perl-module src_compile
|
||||
base_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source ${TMPENVFILE}
|
||||
|
||||
einfo "Doing stock install"
|
||||
# parallel make install b0rked
|
||||
emake -j1 DESTDIR="${D}" install || die
|
||||
|
||||
# Build the envdir file
|
||||
# Don't forget this..
|
||||
einfo "Building environment file"
|
||||
(
|
||||
echo "# These settings are what was present in the environment when this"
|
||||
echo "# Amanda was compiled. Changing anything below this comment will"
|
||||
echo "# have no effect on your application, but it merely exists to"
|
||||
echo "# preserve them for your next emerge of Amanda"
|
||||
cat "${TMPENVFILE}" | sed "s,=\$,='',g"
|
||||
) >> "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Env.d
|
||||
einfo "Installing environment config file"
|
||||
doenvd "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Lock down next section (up until docs).
|
||||
insopts -m0640
|
||||
# Installing Amanda Xinetd Services Definition
|
||||
einfo "Installing xinetd service file"
|
||||
insinto /etc/xinetd.d
|
||||
if use minimal ; then
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
|
||||
else
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
|
||||
fi
|
||||
|
||||
if ! use minimal; then
|
||||
einfo "Installing Sample Daily Cron Job for Amanda"
|
||||
insinto /etc/cron.daily
|
||||
newins "${MYFILESDIR}/amanda-cron" amanda
|
||||
fi
|
||||
|
||||
insinto /etc/amanda
|
||||
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
|
||||
doins "${T}/amandahosts"
|
||||
fperms 600 /etc/amanda/amandahosts
|
||||
|
||||
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
|
||||
insinto "${AMANDA_USER_HOMEDIR}"
|
||||
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
|
||||
newins "${MYFILESDIR}/amanda-profile" .profile
|
||||
|
||||
insinto /etc/amanda
|
||||
doins "${S}/example/amanda-client.conf"
|
||||
if ! use minimal ; then
|
||||
insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
|
||||
doins "${S}/example/amanda.conf"
|
||||
doins "${S}/example/disklist"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
|
||||
fi
|
||||
|
||||
keepdir "${AMANDA_TAR_LISTDIR}"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/amanda"
|
||||
keepdir "${AMANDA_TMPDIR}/dumps"
|
||||
# Just make sure it exists for XFS to work...
|
||||
use xfs && keepdir /var/xfsdump/inventory
|
||||
|
||||
local i
|
||||
for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" /etc/amanda; do
|
||||
einfo "Securing directory (${i})"
|
||||
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
|
||||
done
|
||||
# Do NOT use -R
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
|
||||
"${AMANDA_USER_HOMEDIR}/amanda" \
|
||||
"${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
|
||||
/etc/amanda /etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
|
||||
einfo "Setting setuid permissions"
|
||||
amanda_permissions_fix "${D}"
|
||||
|
||||
# Relax permissions again
|
||||
insopts -m0644
|
||||
|
||||
# docs
|
||||
einfo "Installing documentation"
|
||||
dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
|
||||
# our inetd sample
|
||||
einfo "Installing standard inetd sample"
|
||||
newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
|
||||
# Amanda example configs
|
||||
einfo "Installing example configurations"
|
||||
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
|
||||
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
|
||||
docinto example1
|
||||
newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
|
||||
newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
|
||||
newdoc "${FILESDIR}/example_global.conf" global.conf
|
||||
|
||||
einfo "Cleaning up dud .la files"
|
||||
perlinfo
|
||||
find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[ ! -f "${TMPENVFILE}" -a "$EMERGE_FROM" == "binary" ] && \
|
||||
TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
||||
# Migration of amandates from /etc to $localstatedir/amanda
|
||||
if [ -f "${ROOT}/etc/amandates" -a \
|
||||
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
|
||||
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
|
||||
einfo "A backup is also placed at /etc/amandates.orig"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
|
||||
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
|
||||
fi
|
||||
if [ -f "${ROOT}/etc/amandates" ]; then
|
||||
einfo "If you have migrated safely, please delete /etc/amandates"
|
||||
fi
|
||||
|
||||
einfo "Checking setuid permissions"
|
||||
amanda_permissions_fix "${ROOT}"
|
||||
|
||||
elog "You should configure Amanda in /etc/amanda now."
|
||||
elog
|
||||
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
|
||||
elog "and restart xinetd afterwards!"
|
||||
elog
|
||||
elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
|
||||
elog "as an example of how to configure your inetd."
|
||||
elog
|
||||
elog "NOTICE: If you need raw access to partitions you need to add the"
|
||||
elog "amanda user to the 'disk' group."
|
||||
elog
|
||||
elog "NOTICE: If you have a tape changer, you need to add the amanda user"
|
||||
elog "to the 'tape' group."
|
||||
elog
|
||||
elog "If you use localhost in your disklist your restores may break."
|
||||
elog "You should replace it with the actual hostname!"
|
||||
elog "Please also see the syntax changes to amandahosts."
|
||||
}
|
||||
|
||||
# We have had reports of amanda file permissions getting screwed up.
|
||||
# Losing setuid, becoming too lax etc.
|
||||
# ONLY root and users in the amanda group should be able to run these binaries!
|
||||
amanda_permissions_fix() {
|
||||
local root="$1"
|
||||
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
|
||||
local le="/usr/libexec/amanda"
|
||||
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
|
||||
"${le}"/rundump "${le}"/runtar "${le}"/dumper \
|
||||
"${le}"/planner ; do
|
||||
chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
|
||||
chmod u=srwx,g=rx,o= "${root}"/${i}
|
||||
done
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-i18n/nkf/nkf-2.1.2-r2.ebuild,v 1.1 2013/09/10 06:53:47 idella4 Exp $
|
||||
|
||||
EAPI="5"
|
||||
PYTHON_COMPAT=( python{2_6,2_7} )
|
||||
inherit eutils distutils-r1 perl-module toolchain-funcs
|
||||
|
||||
DESCRIPTION="Network Kanji code conversion Filter with UTF-8/16 support"
|
||||
HOMEPAGE="http://sourceforge.jp/projects/nkf/"
|
||||
SRC_URI="mirror://sourceforge.jp/nkf/53171/${P}.tar.gz
|
||||
python? ( http://dev.gentoo.org/~naota/files/NKF_python20090602.tgz )"
|
||||
|
||||
LICENSE="ZLIB"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-macos"
|
||||
IUSE="perl python linguas_ja"
|
||||
|
||||
src_prepare() {
|
||||
sed -i \
|
||||
-e "/^CFLAGS/s:-O2:${CFLAGS}:" \
|
||||
-e '/-o nkf/s:$(CFLAGS):$(CFLAGS) $(LDFLAGS):' \
|
||||
Makefile || die
|
||||
|
||||
if use python; then
|
||||
mv "${WORKDIR}/NKF.python" "${S}" || die
|
||||
sed -i -e "s/-s/${CFLAGS}/" NKF.python/setup.py || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake CC="$(tc-getCC)" nkf || die
|
||||
if use perl; then
|
||||
cd "${S}/NKF.mod"
|
||||
perl-module_src_compile
|
||||
fi
|
||||
if use python; then
|
||||
cd "${S}/NKF.python"
|
||||
distutils-r1_src_compile
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake test || die
|
||||
if use perl; then
|
||||
cd "${S}/NKF.mod"
|
||||
perl-module_src_test
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin nkf || die
|
||||
doman nkf.1
|
||||
|
||||
if use linguas_ja; then
|
||||
./nkf -e nkf.1j > nkf.1
|
||||
doman -i18n=ja nkf.1
|
||||
fi
|
||||
dodoc nkf.doc
|
||||
|
||||
if use perl; then
|
||||
cd "${S}/NKF.mod"
|
||||
perl-module_src_install
|
||||
fi
|
||||
if use python; then
|
||||
cd "${S}/NKF.python"
|
||||
distutils-r1_src_install
|
||||
fi
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST zinnia-0.05.tar.gz 455113 SHA256 36b861d0989c0e2d7596bd596235c2a15223d152acd0322b6284091a4122b9a3 SHA512 b0fe26316930f23ffba5aed9614761bf44e2ed5b2cbdfc0d941b5b7e4867b031756de524b12e903f6dafeffc5588954c43014f919b81474588d6f72edfee99b0 WHIRLPOOL dd4a106001558acf6ef2bcb58edf823018a6cf8751772a54068899d9f313f2716ccda37239915bfbd3de4f1e2bf8eff3185a8fe41fcaadce2fa00190da5167ba
|
||||
DIST zinnia-0.06.tar.gz 457415 SHA256 ece3af93f937282971634fd81d3e997f848e8cfa958220e26a4564ca064ac20b SHA512 b9a44dc3664302269c4d8481225964a3188c1921f5af7f136fdccdc452917f6ff934884e266436a0f1e0a32af19d3bea5f5e4416e694a653983039a513277b53 WHIRLPOOL 3d0822a5dfaa46ad5dab144888e10f2a0d473e12dcb0f3754e8d55d93cfed19b5ded44c9ca2f2b16451450e05c8b6e5819bf5789d546eb0955f91b37179fe413
|
||||
|
@ -1,19 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-i18n/zinnia/zinnia-0.05.ebuild,v 1.1 2010/05/04 02:38:01 matsuu Exp $
|
||||
|
||||
DESCRIPTION="Online hand recognition system with machine learning"
|
||||
HOMEPAGE="http://zinnia.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/zinnia/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die
|
||||
|
||||
dodoc AUTHORS ChangeLog NEWS README || die
|
||||
dohtml doc/*.html doc/*.css || die
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-i18n/zinnia/zinnia-0.06-r2.ebuild,v 1.2 2013/09/10 08:33:50 idella4 Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit perl-module eutils flag-o-matic toolchain-funcs autotools
|
||||
|
||||
DESCRIPTION="Online hand recognition system with machine learning"
|
||||
HOMEPAGE="http://zinnia.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/zinnia/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
# Package warrants IUSE doc
|
||||
IUSE="perl"
|
||||
DOCS=( AUTHORS ChangeLog NEWS README )
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${P}-ricedown.patch"
|
||||
epatch "${FILESDIR}/${P}-perl.patch"
|
||||
eautoreconf
|
||||
|
||||
if use perl ; then
|
||||
(
|
||||
cd "${S}/perl"
|
||||
perl-module_src_prepare
|
||||
)
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
base_src_compile
|
||||
|
||||
if use perl ; then
|
||||
(
|
||||
cd "${S}/perl"
|
||||
|
||||
# We need to run this here as otherwise it won't pick up the
|
||||
# just-built -lzinnia and cause the extension to have
|
||||
# undefined symbols.
|
||||
perl-module_src_configure
|
||||
|
||||
append-cppflags "-I${S}"
|
||||
append-ldflags "-L${S}/.libs"
|
||||
|
||||
emake \
|
||||
LDDLFLAGS="-shared" \
|
||||
OTHERLDFLAGS="${LDFLAGS}" \
|
||||
CC="$(tc-getCXX)" LD="$(tc-getCXX)" \
|
||||
OPTIMIZE="${CPPFLAGS} ${CXXFLAGS}" \
|
||||
)
|
||||
fi
|
||||
}
|
||||
|
||||
# no tests present
|
||||
src_test() { :; }
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
find "${D}" -name '*.la' -delete
|
||||
|
||||
if use perl ; then
|
||||
(
|
||||
cd "${S}/perl"
|
||||
perl-module_src_install
|
||||
)
|
||||
fi
|
||||
|
||||
# Curiously ChangeLog & NEWS are left uncompressed
|
||||
dodoc ${DOCS[@]}
|
||||
dohtml doc/*.html doc/*.css
|
||||
}
|
@ -1,167 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-misc/g15daemon/g15daemon-1.9.5.3-r3.ebuild,v 1.8 2011/04/16 22:56:19 arfrever Exp $
|
||||
|
||||
EAPI=3
|
||||
GENTOO_DEPEND_ON_PERL="no"
|
||||
PYTHON_DEPEND="python? *"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
|
||||
inherit eutils linux-info perl-module python base
|
||||
|
||||
DESCRIPTION="G15daemon takes control of the G15 keyboard, through the linux kernel uinput device driver"
|
||||
HOMEPAGE="http://g15daemon.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc ppc64 x86"
|
||||
IUSE="perl python"
|
||||
|
||||
DEPEND="virtual/libusb:0
|
||||
>=dev-libs/libg15-1.2.4
|
||||
>=dev-libs/libg15render-1.2
|
||||
perl? (
|
||||
dev-lang/perl
|
||||
dev-perl/GDGraph
|
||||
>=dev-perl/Inline-0.4
|
||||
)"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${P}-forgotten-open-mode.patch" )
|
||||
uinput_check() {
|
||||
ebegin "Checking for uinput support"
|
||||
local rc=1
|
||||
linux_config_exists && linux_chkconfig_present INPUT_UINPUT
|
||||
rc=$?
|
||||
|
||||
if [[ $rc -ne 0 ]] ; then
|
||||
eerror "To use g15daemon, you need to compile your kernel with uinput support."
|
||||
eerror "Please enable uinput support in your kernel config, found at:"
|
||||
eerror
|
||||
eerror "Device Drivers -> Input Device ... -> Miscellaneous devices -> User level driver support."
|
||||
eerror
|
||||
eerror "Once enabled, you should have the /dev/input/uinput device."
|
||||
eerror "g15daemon will not work without the uinput device."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
linux-info_pkg_setup
|
||||
uinput_check
|
||||
if use python; then
|
||||
python_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
if use perl; then
|
||||
unpack "./${P}/lang-bindings/perl-G15Daemon-0.2.tar.gz"
|
||||
fi
|
||||
if use python; then
|
||||
unpack "./${P}/lang-bindings/pyg15daemon-0.0.tar.bz2"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use perl; then
|
||||
perl-module_src_prepare
|
||||
sed -i \
|
||||
-e '1i#!/usr/bin/perl' \
|
||||
"${S}"/contrib/testbindings.pl
|
||||
else
|
||||
# perl-module_src_prepare always calls base_src_prepare
|
||||
base_src_prepare
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
base_src_configure
|
||||
|
||||
if use perl; then
|
||||
cd "${WORKDIR}/G15Daemon-0.2"
|
||||
perl-module_src_configure
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
base_src_compile
|
||||
|
||||
if use perl; then
|
||||
cd "${WORKDIR}/G15Daemon-0.2"
|
||||
perl-module_src_compile
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
docdir=/usr/share/doc/${PF} install || die "make install failed"
|
||||
|
||||
# remove odd docs installed my make
|
||||
rm "${D}/usr/share/doc/${PF}/"{LICENSE,README.usage}
|
||||
|
||||
insinto /usr/share/${PN}/contrib
|
||||
doins contrib/xmodmaprc
|
||||
doins contrib/xmodmap.sh
|
||||
if use perl; then
|
||||
doins contrib/testbindings.pl
|
||||
fi
|
||||
|
||||
newconfd "${FILESDIR}/${PN}-1.2.7.confd" ${PN}
|
||||
newinitd "${FILESDIR}/${PN}-1.2.7-r2.initd" ${PN}
|
||||
dobin "${FILESDIR}/g15daemon-hotplug"
|
||||
insinto /lib/udev/rules.d
|
||||
doins "${FILESDIR}/99-g15daemon.rules"
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/g15daemon.conf
|
||||
|
||||
if use perl; then
|
||||
ebegin "Installing Perl Bindings (G15Daemon.pm)"
|
||||
cd "${WORKDIR}/G15Daemon-0.2"
|
||||
docinto perl
|
||||
perl-module_src_install
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
ebegin "Installing Python Bindings (g15daemon.py)"
|
||||
cd "${WORKDIR}/pyg15daemon"
|
||||
|
||||
installation() {
|
||||
insinto $(python_get_sitedir)
|
||||
doins g15daemon.py
|
||||
}
|
||||
python_execute_function installation
|
||||
|
||||
docinto python
|
||||
dodoc AUTHORS
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use python; then
|
||||
python_mod_optimize g15daemon.py
|
||||
echo ""
|
||||
fi
|
||||
|
||||
elog "To use g15daemon, you need to add g15daemon to the default runlevel."
|
||||
elog "This can be done with:"
|
||||
elog "# /sbin/rc-update add g15daemon default"
|
||||
elog "You can edit some g15daemon options at /etc/conf.d/g15daemon"
|
||||
elog ""
|
||||
elog "To have all new keys working in X11, you'll need create a "
|
||||
elog "specific xmodmap in your home directory or edit the existent one."
|
||||
elog ""
|
||||
elog "Create the xmodmap:"
|
||||
elog "cp /usr/share/g15daemon/contrib/xmodmaprc ~/.Xmodmap"
|
||||
elog ""
|
||||
elog "Adding keycodes to an existing xmodmap:"
|
||||
elog "cat /usr/share/g15daemon/contrib/xmodmaprc >> ~/.Xmodmap"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
if use python; then
|
||||
python_mod_cleanup g15daemon.py
|
||||
fi
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-office/taskcoach/taskcoach-1.3.32-r1.ebuild,v 1.1 2013/09/09 17:54:05 ago Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python{2_6,2_7} )
|
||||
|
||||
inherit distutils-r1 eutils
|
||||
|
||||
MY_PN="TaskCoach"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="Simple personal tasks and todo lists manager"
|
||||
HOMEPAGE="http://www.taskcoach.org http://pypi.python.org/pypi/TaskCoach"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="libnotify"
|
||||
DEPEND=">=dev-python/wxpython-2.8.9.2:2.8[${PYTHON_USEDEP}]"
|
||||
RDEPEND="${DEPEND}
|
||||
libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
DOCS=( CHANGES.txt README.txt )
|
||||
|
||||
python_install_all() {
|
||||
distutils-r1_python_install_all
|
||||
|
||||
# a bit ugly but...
|
||||
mv "${D}/usr/bin/taskcoach.py" "${D}/usr/bin/taskcoach" || die
|
||||
for file in "${D}"/usr/bin/taskcoach.py-*; do
|
||||
dir=$(dirname ${file})
|
||||
ver=$(basename ${file})
|
||||
ver=${ver#taskcoach.py-}
|
||||
mv "${file}" "${dir}/taskcoach-${ver}" || die
|
||||
done
|
||||
|
||||
doicon "icons.in/${PN}.png"
|
||||
make_desktop_entry ${PN} "Task Coach" ${PN} Office
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-pda/pilot-link/pilot-link-0.12.5-r1.ebuild,v 1.1 2013/09/10 09:23:57 idella4 Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python{2_6,2_7} )
|
||||
|
||||
inherit autotools distutils-r1 eutils perl-module java-pkg-opt-2
|
||||
|
||||
DESCRIPTION="suite of tools for moving data between a Palm device and a desktop"
|
||||
HOMEPAGE="http://www.pilot-link.org/"
|
||||
SRC_URI="http://pilot-link.org/source/${P}.tar.bz2"
|
||||
|
||||
LICENSE="|| ( GPL-2 LGPL-2 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
|
||||
IUSE="bluetooth debug java perl png python readline static-libs threads usb"
|
||||
|
||||
COMMON_DEPEND="dev-libs/popt
|
||||
>=sys-libs/ncurses-5.7-r7
|
||||
virtual/libiconv
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
perl? ( >=dev-lang/perl-5.12 )
|
||||
png? ( media-libs/libpng:0 )
|
||||
readline? ( >=sys-libs/readline-6 )
|
||||
usb? ( virtual/libusb:0 )"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
java? ( >=virtual/jdk-1.4 )"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
java? ( >=virtual/jre-1.4 )"
|
||||
|
||||
src_prepare() {
|
||||
epatch \
|
||||
"${FILESDIR}"/${PN}-0.12.3-java-install.patch \
|
||||
"${FILESDIR}"/${PN}-0.12.3-respect-javacflags.patch \
|
||||
"${FILESDIR}"/${PN}-0.12.2-werror_194921.patch \
|
||||
"${FILESDIR}"/${PN}-0.12.2-threads.patch \
|
||||
"${FILESDIR}"/${PN}-0.12.3-{libpng14,png}.patch \
|
||||
"${FILESDIR}"/${PN}-0.12.3-distutils.patch \
|
||||
"${FILESDIR}"/${PN}-0.12.3-libusb-compat-usb_open.patch \
|
||||
"${FILESDIR}"/${PN}-0.12.5-perl514.patch
|
||||
|
||||
AT_M4DIR="m4" eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# tcl/tk support is disabled as per upstream request.
|
||||
econf \
|
||||
--includedir="${EPREFIX}"/usr/include/libpisock \
|
||||
$(use_enable static-libs static) \
|
||||
--enable-conduits \
|
||||
$(use_enable threads) \
|
||||
$(use_enable usb libusb) \
|
||||
$(use_enable debug) \
|
||||
$(use_with png libpng) \
|
||||
$(use_with bluetooth bluez) \
|
||||
$(use_with readline) \
|
||||
$(use_with perl) \
|
||||
$(use_with java) \
|
||||
--without-tcl \
|
||||
$(use_with python)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
if use perl; then
|
||||
cd "${S}"/bindings/Perl
|
||||
perl-module_src_prep
|
||||
local mymake=( OTHERLDFLAGS="${LDFLAGS} -L../../libpisock/.libs -lpisock" ) #308629
|
||||
perl-module_src_compile
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
cd "${S}"/bindings/Python
|
||||
distutils-r1_src_compile
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
dodoc ChangeLog NEWS README doc/{README*,TODO}
|
||||
|
||||
if use java; then
|
||||
cd "${S}"/bindings/Java
|
||||
java-pkg_newjar ${PN}.jar
|
||||
java-pkg_doso libjpisock.so
|
||||
fi
|
||||
|
||||
if use perl; then
|
||||
cd "${S}"/bindings/Perl
|
||||
perl-module_src_install
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
cd "${S}"/bindings/Python
|
||||
distutils-r1_src_install
|
||||
fi
|
||||
|
||||
find "${D}" -name '*.la' -exec rm -f {} +
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
perl-module_pkg_preinst
|
||||
java-pkg-opt-2_pkg_preinst
|
||||
}
|
@ -0,0 +1 @@
|
||||
DIST youcompleteme-20130910.tar.xz 2340104 SHA256 00906c92ba3c0f113c73398997008d9c8b3f31d617f5da233f25174a6d488bac SHA512 c1022a27ced00e8ba8e9aa25029a0032805331cf0f80342aaaf9d7d4ec7780a098ffbd315068f19f6c98b00c4b4b43e59c7fa40070057e097ca40f6398b53b6b WHIRLPOOL 867c3f0c08473246c52377bdb9ac52b96af1d1b3a970cb087784e54082afe19e6549c54bb37f460d379b5fac8f5f7aa4bccb1e24b0984a98c08750469ff518c6
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>vim</herd>
|
||||
<use>
|
||||
<flag name="clang">Enable semantic support for C-family languages using <pkg>sys-devel/clang</pkg></flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
@ -0,0 +1,88 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-vim/youcompleteme/youcompleteme-20130910.ebuild,v 1.2 2013/09/10 10:41:22 radhermit Exp $
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python{2_6,2_7} )
|
||||
inherit multilib python-single-r1 cmake-utils vim-plugin
|
||||
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
EGIT_REPO_URI="git://github.com/Valloric/YouCompleteMe.git"
|
||||
inherit git-r3
|
||||
else
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
SRC_URI="http://dev.gentoo.org/~radhermit/vim/${P}.tar.xz"
|
||||
fi
|
||||
|
||||
DESCRIPTION="vim plugin: a code-completion engine for Vim"
|
||||
HOMEPAGE="http://valloric.github.io/YouCompleteMe/"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
IUSE="+clang test"
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
clang? ( >=sys-devel/clang-3.3 )
|
||||
|| (
|
||||
app-editors/vim[python,${PYTHON_USEDEP}]
|
||||
app-editors/gvim[python,${PYTHON_USEDEP}]
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
test? (
|
||||
>=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/nose-1.3.0[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
CMAKE_IN_SOURCE_BUILD=1
|
||||
CMAKE_USE_DIR=${S}/cpp
|
||||
|
||||
VIM_PLUGIN_HELPFILES="${PN}"
|
||||
|
||||
src_prepare() {
|
||||
if ! use test ; then
|
||||
sed -i '/^add_subdirectory( tests )/d' cpp/ycm/CMakeLists.txt || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
$(cmake-utils_use_use clang CLANG_COMPLETER)
|
||||
$(cmake-utils_use_use clang SYSTEM_LIBCLANG)
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# TODO: use system gmock/gtest
|
||||
cd "${S}"/cpp
|
||||
emake ycm_core_tests
|
||||
cd ycm/tests || die
|
||||
LD_LIBRARY_PATH="${EROOT}"/usr/$(get_libdir)/llvm \
|
||||
"${S}"/cpp/ycm/tests/ycm_core_tests || die
|
||||
|
||||
cd "${S}"/python/ycm
|
||||
nosetests || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodoc *.md
|
||||
rm -r *.md *.sh COPYING.txt cpp || die
|
||||
find python -name *test* -exec rm -rf {} + || die
|
||||
rm python/libclang.so || die
|
||||
|
||||
vim-plugin_src_install
|
||||
|
||||
python_optimize "${ED}"
|
||||
python_fix_shebang "${ED}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
vim-plugin_pkg_postinst
|
||||
|
||||
if [[ -z ${REPLACING_VERSIONS} ]] ; then
|
||||
elog
|
||||
elog "optional dependencies:"
|
||||
elog " dev-python/jedi (better python autocompletion)"
|
||||
elog
|
||||
fi
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-vim/youcompleteme/youcompleteme-99999999.ebuild,v 1.2 2013/09/10 10:41:22 radhermit Exp $
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python{2_6,2_7} )
|
||||
inherit multilib python-single-r1 cmake-utils vim-plugin
|
||||
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
EGIT_REPO_URI="git://github.com/Valloric/YouCompleteMe.git"
|
||||
inherit git-r3
|
||||
else
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
SRC_URI="http://dev.gentoo.org/~radhermit/vim/${P}.tar.xz"
|
||||
fi
|
||||
|
||||
DESCRIPTION="vim plugin: a code-completion engine for Vim"
|
||||
HOMEPAGE="http://valloric.github.io/YouCompleteMe/"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
IUSE="+clang test"
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
clang? ( >=sys-devel/clang-3.3 )
|
||||
|| (
|
||||
app-editors/vim[python,${PYTHON_USEDEP}]
|
||||
app-editors/gvim[python,${PYTHON_USEDEP}]
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
test? (
|
||||
>=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/nose-1.3.0[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
CMAKE_IN_SOURCE_BUILD=1
|
||||
CMAKE_USE_DIR=${S}/cpp
|
||||
|
||||
VIM_PLUGIN_HELPFILES="${PN}"
|
||||
|
||||
src_prepare() {
|
||||
if ! use test ; then
|
||||
sed -i '/^add_subdirectory( tests )/d' cpp/ycm/CMakeLists.txt || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
$(cmake-utils_use_use clang CLANG_COMPLETER)
|
||||
$(cmake-utils_use_use clang SYSTEM_LIBCLANG)
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# TODO: use system gmock/gtest
|
||||
cd "${S}"/cpp
|
||||
emake ycm_core_tests
|
||||
cd ycm/tests || die
|
||||
LD_LIBRARY_PATH="${EROOT}"/usr/$(get_libdir)/llvm \
|
||||
"${S}"/cpp/ycm/tests/ycm_core_tests || die
|
||||
|
||||
cd "${S}"/python/ycm
|
||||
nosetests || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodoc *.md
|
||||
rm -r *.md *.sh COPYING.txt cpp || die
|
||||
find python -name *test* -exec rm -rf {} + || die
|
||||
rm python/libclang.so || die
|
||||
|
||||
vim-plugin_src_install
|
||||
|
||||
python_optimize "${ED}"
|
||||
python_fix_shebang "${ED}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
vim-plugin_pkg_postinst
|
||||
|
||||
if [[ -z ${REPLACING_VERSIONS} ]] ; then
|
||||
elog
|
||||
elog "optional dependencies:"
|
||||
elog " dev-python/jedi (better python autocompletion)"
|
||||
elog
|
||||
fi
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST maatkit-7207.tar.gz 1194909 SHA256 f1cdb59d8c06b9f172a49094f02d263f08ae3716d010b88c55ec16e484f9a498 SHA512 bafd2beecb6863732c671bc9a6714cb696dab1f38702100f590f18109bc4e0dea9d424c3a57c28ea926626856c4845991574dd766e6bb39bb62c5f53195a6193 WHIRLPOOL 6865fcfcb7ffe67d76618b84c2571f336e178585136eb2dd5ceb9636b7fb9c60089fd76ff097e0082d8543d553d05f495d47905354921a0aec78446f366f20f6
|
||||
DIST maatkit-7540.tar.gz 1312812 SHA256 618b8ba8f8df1c8ac04d127986a7bb6a834643523000c9c5ea4ee7d95aeef9a8 SHA512 98cb44a5ebce09322b4d9a8cfa9e14e2ccb54ef9e0e8a95ee92b0fee5277f06157415152566497893488967735049d95c6efadc0d57c8a70060c7bc714afef9a WHIRLPOOL 73685d156a750263ec8d8ba6d22c6e96aa98ed2247523b74a336572ef8e6ae8239f84dd2e7839752c921baca55d911195c0bb1e83d42a87b3a721fa7d0e8439d
|
||||
|
@ -1,2 +1 @@
|
||||
DIST percona-toolkit-2.1.1.tar.gz 1182760 SHA256 ae8fc0479ee48a1ef1882006eecfbcdd3ba1ab5cae19825087fb02d96d8e4a39 SHA512 161f6e87fd9b93fd9d22b767eada2db8b1ddbdeae25305d7bb91d74a7281ba5fe773ee2e4305a5df0186fc5482fe186f60a86053e53b33d5f0d5c60ac55f15ab WHIRLPOOL e5f71aa274f182ffe0a07e9de7f42c51f41ca794a7b17843f5edf81756aa0d170eee46d0502f4940dd9ac994fa37ace30c38876bbb2954e6817cd392f020eabf
|
||||
DIST percona-toolkit-2.1.7.tar.gz 1468872 SHA256 9b8be47ad4470ae2af684c0014b6cef8df4868457c73e924bb89bfca5a600479 SHA512 1a228ef7de4129079de35dca032a020887cd692a9d04d61c3317f8636c5e90ac671bd943c2e8cefa101748daa2891f022ce5031920030d605a83bbeb19c9bb8a WHIRLPOOL f28e58f432207ae09652ef49baece5eada40b7be9d9a38b1a52115c65c13e9857e925b1c7fdba9eec0bc7f8e1960ad5a46de00703f59ce25b2aaff0a7ee5435b
|
||||
|
@ -1,34 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/percona-toolkit/percona-toolkit-2.1.1.ebuild,v 1.1 2012/04/19 20:01:55 robbat2 Exp $
|
||||
|
||||
EAPI=3
|
||||
|
||||
inherit perl-app perl-module toolchain-funcs
|
||||
|
||||
DESCRIPTION="essential command-line utilities for MySQL"
|
||||
HOMEPAGE="http://www.percona.com/software/percona-toolkit/"
|
||||
SRC_URI="http://www.percona.com/downloads/${PN}/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( GPL-2 Artistic )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
IUSE=""
|
||||
|
||||
COMMON_DEPEND="dev-perl/DBI
|
||||
dev-perl/DBD-mysql
|
||||
virtual/perl-Time-HiRes"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
virtual/perl-Getopt-Long
|
||||
virtual/perl-Time-Local
|
||||
virtual/perl-Digest-MD5
|
||||
virtual/perl-IO-Compress
|
||||
virtual/perl-File-Temp
|
||||
virtual/perl-File-Spec
|
||||
virtual/perl-Time-HiRes
|
||||
virtual/perl-Scalar-List-Utils
|
||||
dev-perl/TermReadKey"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
virtual/perl-ExtUtils-MakeMaker"
|
||||
|
||||
# Percona Toolkit does NOT contain the UDF code for Murmur/FNV any more.
|
@ -1,170 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.3_beta1.ebuild,v 1.1 2013/06/12 01:20:28 titanofold Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib prefix versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# Comment the following five lines when not a beta or rc.
|
||||
MY_PV="${PV//_}"
|
||||
MY_FILE_PV="${SLOT}$(get_version_component_range 4)"
|
||||
S="${WORKDIR}/postgresql-${MY_PV}"
|
||||
SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-${SLOT}.tbz2"
|
||||
|
||||
# Comment the following three lines when a beta or rc.
|
||||
#S="${WORKDIR}/postgresql-${PV}"
|
||||
#SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
# http://dev.gentoo.org/~titanofold/postgresql-patches-${SLOT}.tbz2"
|
||||
|
||||
LICENSE="POSTGRESQL"
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="
|
||||
>=app-admin/eselect-postgresql-1.0.10
|
||||
sys-apps/less
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( sys-libs/readline )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
#PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c \
|
||||
|| die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with readline) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib) \
|
||||
$(use_with ldap)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/
|
||||
cp -r "${S}"/doc/src/sgml/man{1,7} "${ED}"/usr/share/postgresql-${SLOT}/man/ || die
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
|
||||
# Don't use ${PF} here as three packages
|
||||
# (dev-db/postgresql-{docs,base,server}) have the same set of docs.
|
||||
insinto /usr/share/doc/postgresql-${SLOT}
|
||||
doins README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.3.0.ebuild,v 1.1 2013/09/10 05:54:51 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# Comment the following four lines when not a beta or rc.
|
||||
#MY_PV="${PV//_}"
|
||||
#MY_FILE_PV="${SLOT}$(get_version_component_range 4)"
|
||||
#S="${WORKDIR}/postgresql-${MY_FILE_PV}"
|
||||
#SRC_URI="mirror://postgresql/source/v${MY_FILE_PV}/postgresql-${MY_FILE_PV}.tar.bz2"
|
||||
|
||||
# Comment the following two lines when a beta or rc.
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Don't use ${PF} here as three packages
|
||||
# (dev-db/postgresql-{docs,base,server}) have the same set of docs.
|
||||
local mypath=/usr/share/doc/postgresql-${SLOT}
|
||||
|
||||
cd "${S}/doc"
|
||||
|
||||
insinto ${mypath}/html
|
||||
doins src/sgml/html/*
|
||||
|
||||
insinto ${mypath}/sgml
|
||||
doins src/sgml/*.{sgml,dsl}
|
||||
|
||||
insinto ${mypath}/sgml/ref
|
||||
doins src/sgml/ref/*.sgml
|
||||
|
||||
fowners root:0 -R ${mypath}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
@ -1,357 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.3_beta1-r1.ebuild,v 1.2 2013/09/05 19:44:45 mgorny Exp $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
PYTHON_COMPAT=( python{2_{6,7},3_{2,3}} )
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib pam prefix python-single-r1 systemd user versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# Comment the following six lines when not a beta or rc.
|
||||
MY_PV="${PV//_}"
|
||||
MY_FILE_PV="${SLOT}$(get_version_component_range 4)"
|
||||
S="${WORKDIR}/postgresql-${MY_PV}"
|
||||
SRC_URI="mirror://postgresql/source/v${MY_FILE_PV}/postgresql-${MY_PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-${SLOT}.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.5.tbz2"
|
||||
|
||||
# Comment the following four lines when a beta or rc.
|
||||
#S="${WORKDIR}/postgresql-${PV}"
|
||||
#SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
# http://dev.gentoo.org/~titanofold/postgresql-patches-${SLOT}.tbz2
|
||||
# http://dev.gentoo.org/~titanofold/postgresql-initscript-2.5.tbz2"
|
||||
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="kerberos kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl test uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[kerberos?,pam?,pg_legacytimestamp=,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
#PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/server.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use pam ; then
|
||||
sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
||||
-i src/backend/libpq/auth.c \
|
||||
|| die 'PGSQL_PAM_SERVICE rename failed.'
|
||||
fi
|
||||
|
||||
if use perl ; then
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
-i "${S}/src/pl/plperl/GNUmakefile" || die 'sed plperl failed'
|
||||
fi
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}"/postgresql.{init,confd,service} || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${PO}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
--with-includes="${PO}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-libraries="${PO}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2); do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd || die "emake in $bd failed"
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd DESTDIR="${D}" || die "emake install in $bd failed"
|
||||
done
|
||||
|
||||
# Avoid file collision with -base.
|
||||
local l
|
||||
for l in lib lib32 lib64 ; do
|
||||
rm "${ED}/usr/${l}/postgresql-${SLOT}/${l}/libpgcommon.a"
|
||||
done
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT}
|
||||
newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT}
|
||||
|
||||
systemd_newunit "${WORKDIR}"/postgresql.service postgresql-${SLOT}.service
|
||||
systemd_newtmpfilesd "${WORKDIR}"/postgresql.tmpfilesd postgresql-${SLOT}.conf
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql-${SLOT} auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir /run/postgresql
|
||||
fperms 0775 /run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}/run/postgresql/"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttp://www.gentoo.org/doc/en/postgres-howto.xml#doc_chap5"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128"
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo " Tests not supported on this OS (yet)"
|
||||
else
|
||||
if [ -z ${SKIP_SYSTEM_TESTS} ] ; then
|
||||
einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..."
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
einfo "Passed."
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [ ${UID} -ne 0 ] ; then
|
||||
emake check
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
DIST cabal-install-0.10.2.tar.gz 150699 SHA256 6357c8b984d193a30bb2a05e03dbd551650a0ddea17f7d1033e6564f5b7ff515 SHA512 c49627c1c4e4de73f145bae522e8e09236e9e2d703a0fc908a54856cee755e345b6bc324c85347596724bf25d78a9b3e0c56d5bb2204f306cf740594436e01cc WHIRLPOOL 895490e5fb7981da0f56a1555e7eb02571b9f6e18bb6ca9a9483cacc7e829606ca48c12890b40071c4f23b715bbef14869d035757ed66712901a5df2a877e8b5
|
||||
DIST cabal-install-0.14.0.tar.gz 193187 SHA256 f4f2b50269ff59d67b5f3d82d50f7706b6bad1117295a7c81f32bbe72add5bd8 SHA512 36bfe98c7b7c519a64cbb7e099fa434ba18b393bd591004835f80a7de450eddd58905d291e0d5eefbdfd6748eedb9bbf9ab43462e26e41741ed758d81fae2983 WHIRLPOOL 7fbbd8dc99d2b3cdd0e63f74f686189480e21200be2dd3763254bcc91531e6a64da1f74af23c8d257a17e78f15fd33cced1aec4fdd24e0fbe70cfb16f2a2df98
|
||||
DIST cabal-install-1.16.0.2.tar.gz 201232 SHA256 66dfacc9f33e668e56904072cadb8a36bd9d6522ba5464c6a36a5de7e65c5698 SHA512 3fa29de625741d243778bd7309720fe492ee83ac0d9197155d3467bae956839cde4e387bd56d6633a1723197d81cd9104198ea7ec7fe42ccc9a86a5b2ed5a1df WHIRLPOOL 4700dffed322de02c2793d04d263d9f1dd76df9cb6e551c292037f92f5d3c307185a1f236e9450e4ce3e1da7bed410d29408b3864fa2f83913147f8aa98504ee
|
||||
DIST cabal-install-1.18.0.1.tar.gz 253871 SHA256 6b35189142d6596a712ef316dccd9fe908a1467bea4ef9530805ab8f23e1842c SHA512 f2e6f9ee23f0be84e466dd0d14a3abbf8de2efed2e83c372c26de65a1040e0f11f0a0e8a0e5a80e39299b47ed484a37c3d84a76a9b481a18b3d99bba45dace2b WHIRLPOOL cffe28df788aef51fb06586ff6ca95b72e27d77da31a68f44e19ab661ba6d2436e737078cd410614a391aca72e0c3aec5d6cd842b0a245b7159bc433c1e5ab6b
|
||||
|
@ -0,0 +1,48 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-haskell/cabal-install/cabal-install-1.18.0.1.ebuild,v 1.1 2013/09/09 20:15:36 slyfox Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
# ebuild generated by hackport 0.3.3.9999
|
||||
|
||||
CABAL_FEATURES="bin test-suite"
|
||||
inherit bash-completion-r1 eutils haskell-cabal
|
||||
|
||||
DESCRIPTION="The command-line interface for Cabal and Hackage."
|
||||
HOMEPAGE="http://www.haskell.org/cabal/"
|
||||
SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc64 ~sparc ~x86"
|
||||
IUSE="+noprefs"
|
||||
|
||||
RDEPEND=""
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-haskell/cabal-1.18.0 <dev-haskell/cabal-1.19
|
||||
>=dev-haskell/http-4000.0.8 <dev-haskell/http-4001
|
||||
>=dev-haskell/mtl-2.0 <dev-haskell/mtl-3
|
||||
>=dev-haskell/network-1 <dev-haskell/network-3
|
||||
>=dev-haskell/random-1 <dev-haskell/random-1.1
|
||||
>=dev-haskell/stm-2.0 <dev-haskell/stm-3
|
||||
>=dev-haskell/zlib-0.5.3 <dev-haskell/zlib-0.6
|
||||
>=dev-lang/ghc-6.12.1
|
||||
test? ( dev-haskell/hunit
|
||||
>=dev-haskell/quickcheck-2.5
|
||||
dev-haskell/test-framework
|
||||
dev-haskell/test-framework-hunit
|
||||
>=dev-haskell/test-framework-quickcheck2-0.3 )
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
if use noprefs; then
|
||||
epatch "${FILESDIR}/${PN}"-0.13.3-nopref.patch
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
haskell-cabal_src_install
|
||||
|
||||
newbashcomp "${S}/bash-completion/cabal" ${PN}
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST Cabal-1.14.0.tar.gz 276517 SHA256 72540a9db8b329121b7815ef207098f4b394f76d11d154d36baf54054327abe4 SHA512 6e31f44cfafd44e1e3987ed0b116a52e12495228cb1de89e9f4ded8dbc06a0d1537bf647c4576c606d623b7d58d10367d243258b500b8c8329db6c48afd9eee3 WHIRLPOOL 22225d5923bc454e2fa24bcc9fe845b07c41c56ea67f45a0815597f0dffc4d60027117d38bdd1eccd4e61cd24d682bd8b3f4026cfaf62481712234fc9cea5321
|
||||
DIST Cabal-1.16.0.3.tar.gz 284665 SHA256 ef27629d540e46c77cabac08c008583abee4e4a04ed5a5ecb1a84725dbc39f86 SHA512 7dd365c44b5ea489fcc990e0deca8ffcfdd6b867a35b85b422fc0fe9e3c70739df393cacf425575e5e4977729ef875eb0737aaa13a0f20cfaff9d22b39027a85 WHIRLPOOL 84fbe4c41c14377685c89a93b79e03920d19e65c3c8c51a4ef590bfb8ad331e1ae85d224c1cd820e90262a579131c823510a2e62f4566d452af8e67d5cf26be2
|
||||
DIST Cabal-1.18.0.tar.gz 323177 SHA256 0ef5b8a8b36d6f93ed1e6d31d2b180781849504e85f2bc2c51bafb29a79bbbdb SHA512 061aa1cb56b9c0b52b751a6188b1c361b068524c6840b9c8dd83301fd55f288cc3fc20ef125d37e2d816d01723a68bf59487d03b3b157cad759b5cd1f9269105 WHIRLPOOL 17a4bf261edfeb96cc6b99f81aca6f21ecb6d4d800751b683692f5bcf4dc6709a0c4be17c86143d7e0630df9907d1fa0d22f9631475b00768ac7319563dd2da6
|
||||
|
@ -0,0 +1,66 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-haskell/cabal/cabal-1.18.0.ebuild,v 1.1 2013/09/09 20:10:58 slyfox Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
CABAL_FEATURES="bootstrap lib profile test-suite"
|
||||
inherit eutils haskell-cabal versionator
|
||||
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
LIVE_EBUILD=yes
|
||||
inherit git-2
|
||||
fi
|
||||
|
||||
MY_PN=Cabal
|
||||
MY_P=${MY_PN}-${PV}
|
||||
|
||||
DESCRIPTION="A framework for packaging Haskell software"
|
||||
HOMEPAGE="http://www.haskell.org/cabal/"
|
||||
EGIT_REPO_URI="git://github.com/haskell/cabal.git"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
IUSE="doc"
|
||||
|
||||
if [[ -n ${LIVE_EBUILD} ]]; then
|
||||
# Cabal's subdir
|
||||
EGIT_SOURCEDIR=${S}
|
||||
S="${S}"/${MY_PN}
|
||||
else
|
||||
SRC_URI="mirror://hackage/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"
|
||||
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
fi
|
||||
|
||||
RDEPEND=">=dev-lang/ghc-6:="
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( dev-haskell/extensible-exceptions
|
||||
dev-haskell/hunit
|
||||
>=dev-haskell/quickcheck-2.1.0.1
|
||||
dev-haskell/regex-posix
|
||||
dev-haskell/test-framework
|
||||
dev-haskell/test-framework-hunit
|
||||
>=dev-haskell/test-framework-quickcheck2-0.2.12
|
||||
)"
|
||||
|
||||
src_prepare() {
|
||||
if [[ -n ${LIVE_EBUILD} ]]; then
|
||||
CABAL_FILE=${MY_PN}.cabal cabal_chdeps 'version: 1.17.0' "version: ${PV}"
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
cabal-is-dummy-lib && return
|
||||
|
||||
einfo "Bootstrapping Cabal..."
|
||||
$(ghc-getghc) ${HCFLAGS} -i -i. -i"${WORKDIR}/${FP_P}" -cpp --make Setup.hs \
|
||||
-o setup || die "compiling Setup.hs failed"
|
||||
cabal-configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cabal-is-dummy-lib && return
|
||||
|
||||
cabal-build
|
||||
}
|
@ -1,340 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/icedtea-7.2.3.8.ebuild,v 1.2 2013/08/27 15:57:58 kensington Exp $
|
||||
# Build written by Andrew John Hughes (gnu_andrew@member.fsf.org)
|
||||
|
||||
# *********************************************************
|
||||
# * IF YOU CHANGE THIS EBUILD, CHANGE ICEDTEA-6.* AS WELL *
|
||||
# *********************************************************
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit java-pkg-2 java-vm-2 pax-utils prefix versionator virtualx flag-o-matic
|
||||
|
||||
ICEDTEA_VER=$(get_version_component_range 2-)
|
||||
ICEDTEA_BRANCH=$(get_version_component_range 2-3)
|
||||
ICEDTEA_PKG=icedtea-${ICEDTEA_VER}
|
||||
CORBA_TARBALL="516aae5f27cf.tar.gz"
|
||||
JAXP_TARBALL="1fbe99283d97.tar.gz"
|
||||
JAXWS_TARBALL="3c7be82314bf.tar.gz"
|
||||
JDK_TARBALL="deac45dc94f0.tar.gz"
|
||||
LANGTOOLS_TARBALL="41426c72b802.tar.gz"
|
||||
OPENJDK_TARBALL="ed02a059ea15.tar.gz"
|
||||
HOTSPOT_TARBALL="a152dced63a1.tar.gz"
|
||||
CACAO_TARBALL="a567bcb7f589.tar.gz"
|
||||
JAMVM_TARBALL="jamvm-0972452d441544f7dd29c55d64f1ce3a5db90d82.tar.gz"
|
||||
|
||||
DESCRIPTION="A harness to build OpenJDK using Free Software build tools and dependencies"
|
||||
HOMEPAGE="http://icedtea.classpath.org"
|
||||
SRC_URI="
|
||||
http://icedtea.classpath.org/download/source/${ICEDTEA_PKG}.tar.gz
|
||||
http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/archive/${OPENJDK_TARBALL}
|
||||
http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/corba/archive/${CORBA_TARBALL}
|
||||
http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/jaxp/archive/${JAXP_TARBALL}
|
||||
http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/jaxws/archive/${JAXWS_TARBALL}
|
||||
http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/jdk/archive/${JDK_TARBALL}
|
||||
http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/hotspot/archive/${HOTSPOT_TARBALL}
|
||||
http://icedtea.classpath.org/hg/release/icedtea7-forest-${ICEDTEA_BRANCH}/langtools/archive/${LANGTOOLS_TARBALL}
|
||||
http://icedtea.classpath.org/download/drops/cacao/${CACAO_TARBALL}
|
||||
http://icedtea.classpath.org/download/drops/jamvm/${JAMVM_TARBALL}"
|
||||
|
||||
LICENSE="Apache-1.1 Apache-2.0 GPL-1 GPL-2 GPL-2-with-linking-exception LGPL-2 MPL-1.0 MPL-1.1 public-domain W3C"
|
||||
SLOT="7"
|
||||
KEYWORDS="~amd64 ~ia64 ~x86"
|
||||
|
||||
IUSE="+X +alsa cjk +cups debug doc examples javascript +jbootstrap +nsplugin
|
||||
+nss pax_kernel pulseaudio +source systemtap test +webstart"
|
||||
|
||||
# Ideally the following were optional at build time.
|
||||
ALSA_COMMON_DEP="
|
||||
>=media-libs/alsa-lib-1.0"
|
||||
CUPS_COMMON_DEP="
|
||||
>=net-print/cups-1.2.12"
|
||||
X_COMMON_DEP="
|
||||
>=dev-libs/atk-1.30.0
|
||||
>=dev-libs/glib-2.26
|
||||
media-libs/fontconfig
|
||||
>=media-libs/freetype-2.3.5
|
||||
>=x11-libs/cairo-1.8.8
|
||||
x11-libs/gdk-pixbuf:2
|
||||
>=x11-libs/gtk+-2.8:2
|
||||
>=x11-libs/libX11-1.1.3
|
||||
>=x11-libs/libXext-1.1.1
|
||||
>=x11-libs/libXi-1.1.3
|
||||
>=x11-libs/libXrender-0.9.4
|
||||
>=x11-libs/libXtst-1.0.3
|
||||
>=x11-libs/pango-1.24.5"
|
||||
X_DEPEND="
|
||||
>=x11-libs/libXau-1.0.3
|
||||
>=x11-libs/libXdmcp-1.0.2
|
||||
>=x11-libs/libXinerama-1.0.2
|
||||
x11-proto/inputproto
|
||||
>=x11-proto/xextproto-7.1.1
|
||||
x11-proto/xineramaproto
|
||||
x11-proto/xproto"
|
||||
|
||||
COMMON_DEP="
|
||||
>=media-libs/giflib-4.1.6
|
||||
media-libs/lcms:2
|
||||
>=media-libs/libpng-1.2
|
||||
>=sys-libs/zlib-1.2.3
|
||||
virtual/jpeg:0
|
||||
javascript? ( dev-java/rhino:1.6 )
|
||||
nss? ( >=dev-libs/nss-3.12.5-r1 )
|
||||
pulseaudio? ( >=media-sound/pulseaudio-0.9.11 )
|
||||
systemtap? ( >=dev-util/systemtap-1 )"
|
||||
|
||||
# cups is needed for X. #390945 #390975
|
||||
RDEPEND="${COMMON_DEP}
|
||||
!dev-java/icedtea:0
|
||||
X? (
|
||||
${CUPS_COMMON_DEP}
|
||||
${X_COMMON_DEP}
|
||||
media-fonts/dejavu
|
||||
cjk? (
|
||||
media-fonts/arphicfonts
|
||||
media-fonts/baekmuk-fonts
|
||||
media-fonts/lklug
|
||||
media-fonts/lohit-fonts
|
||||
media-fonts/sazanami
|
||||
)
|
||||
)
|
||||
alsa? ( ${ALSA_COMMON_DEP} )
|
||||
cups? ( ${CUPS_COMMON_DEP} )"
|
||||
|
||||
# Only ant-core-1.8.1 has fixed ant -diagnostics when xerces+xalan are not present.
|
||||
# ca-certificates, perl and openssl are used for the cacerts keystore generation
|
||||
# xext headers have two variants depending on version - bug #288855
|
||||
# autoconf - as long as we use eautoreconf, version restrictions for bug #294918
|
||||
DEPEND="${COMMON_DEP} ${ALSA_COMMON_DEP} ${CUPS_COMMON_DEP} ${X_COMMON_DEP}
|
||||
|| (
|
||||
>=dev-java/gcj-jdk-4.3
|
||||
dev-java/icedtea-bin:7
|
||||
dev-java/icedtea-bin:6
|
||||
dev-java/icedtea:7
|
||||
dev-java/icedtea:6
|
||||
)
|
||||
app-arch/cpio
|
||||
app-arch/unzip
|
||||
app-arch/zip
|
||||
app-misc/ca-certificates
|
||||
>=dev-java/ant-core-1.8.1
|
||||
dev-java/ant-nodeps
|
||||
dev-lang/perl
|
||||
>=dev-libs/libxslt-1.1.26
|
||||
dev-libs/openssl
|
||||
virtual/pkgconfig
|
||||
sys-apps/attr
|
||||
sys-apps/lsb-release
|
||||
${X_DEPEND}
|
||||
pax_kernel? ( sys-apps/paxctl )"
|
||||
|
||||
PDEPEND="webstart? ( dev-java/icedtea-web:7 )
|
||||
nsplugin? ( dev-java/icedtea-web:7[nsplugin] )"
|
||||
|
||||
S="${WORKDIR}"/${ICEDTEA_PKG}
|
||||
|
||||
pkg_setup() {
|
||||
JAVA_PKG_WANT_BUILD_VM="
|
||||
icedtea-7 icedtea-bin-7 icedtea7
|
||||
icedtea-6 icedtea-bin-6 icedtea6 icedtea6-bin
|
||||
gcj-jdk"
|
||||
JAVA_PKG_WANT_SOURCE="1.5"
|
||||
JAVA_PKG_WANT_TARGET="1.5"
|
||||
|
||||
java-vm-2_pkg_setup
|
||||
java-pkg-2_pkg_setup
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${ICEDTEA_PKG}.tar.gz
|
||||
}
|
||||
|
||||
java_prepare() {
|
||||
# For bootstrap builds as the sandbox control file might not yet exist.
|
||||
addpredict /proc/self/coredump_filter
|
||||
|
||||
# icedtea doesn't like some locales. #330433 #389717
|
||||
export LANG="C" LC_ALL="C"
|
||||
}
|
||||
|
||||
bootstrap_impossible() {
|
||||
# Fill this according to testing what works and what not
|
||||
has "${1}" icedtea6 icedtea-6 icedtea6-bin icedtea-bin-6
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local config bootstrap
|
||||
local vm=$(java-pkg_get-current-vm)
|
||||
|
||||
# Whether to bootstrap
|
||||
bootstrap="disable"
|
||||
if use jbootstrap; then
|
||||
if bootstrap_impossible "${vm}"; then
|
||||
einfo "Bootstrap with ${vm} is currently not possible and thus disabled, ignoring USE=jbootstrap"
|
||||
else
|
||||
bootstrap="enable"
|
||||
fi
|
||||
fi
|
||||
|
||||
if has "${vm}" gcj-jdk; then
|
||||
# gcj-jdk ensures ecj is present.
|
||||
use jbootstrap || einfo "bootstrap is necessary when building with ${vm}, ignoring USE=\"-jbootstrap\""
|
||||
bootstrap="enable"
|
||||
local ecj_jar="$(readlink "${EPREFIX}"/usr/share/eclipse-ecj/ecj.jar)"
|
||||
config="${config} --with-ecj-jar=${ecj_jar}"
|
||||
fi
|
||||
|
||||
config="${config} --${bootstrap}-bootstrap"
|
||||
|
||||
# Always use HotSpot as the primary VM if available. #389521 #368669 #357633 ...
|
||||
# Otherwise use JamVM as it's the only possibility right now
|
||||
case "${ARCH}" in
|
||||
amd64|sparc|x86)
|
||||
;;
|
||||
arm)
|
||||
config+=" --enable-jamvm" #IT1266
|
||||
replace-flags -Os -O2 #BGO453612 #IT1267
|
||||
;;
|
||||
*)
|
||||
config+=" --enable-jamvm"
|
||||
;;
|
||||
esac
|
||||
|
||||
# OpenJDK-specific parallelism support. Bug #389791, #337827
|
||||
# Implementation modified from waf-utils.eclass
|
||||
# Note that "-j" is converted to "-j1" as the system doesn't support --load-average
|
||||
local procs=$(echo -j1 ${MAKEOPTS} | sed -r "s/.*(-j\s*|--jobs=)([0-9]+).*/\2/" )
|
||||
config="${config} --with-parallel-jobs=${procs}";
|
||||
einfo "Configuring using --with-parallel-jobs=${procs}"
|
||||
|
||||
if use javascript ; then
|
||||
config="${config} --with-rhino=$(java-pkg_getjar rhino-1.6 js.jar)"
|
||||
else
|
||||
config="${config} --without-rhino"
|
||||
fi
|
||||
|
||||
unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS
|
||||
|
||||
econf ${config} \
|
||||
--with-openjdk-src-zip="${DISTDIR}/${OPENJDK_TARBALL}" \
|
||||
--with-corba-src-zip="${DISTDIR}/${CORBA_TARBALL}" \
|
||||
--with-jaxp-src-zip="${DISTDIR}/${JAXP_TARBALL}" \
|
||||
--with-jaxws-src-zip="${DISTDIR}/${JAXWS_TARBALL}" \
|
||||
--with-jdk-src-zip="${DISTDIR}/${JDK_TARBALL}" \
|
||||
--with-hotspot-src-zip="${DISTDIR}/${HOTSPOT_TARBALL}" \
|
||||
--with-langtools-src-zip="${DISTDIR}/${LANGTOOLS_TARBALL}" \
|
||||
--with-cacao-src-zip="${DISTDIR}/${CACAO_TARBALL}" \
|
||||
--with-jamvm-src-zip="${DISTDIR}/${JAMVM_TARBALL}" \
|
||||
--with-jdk-home="$(java-config -O)" \
|
||||
--with-abs-install-dir=/usr/$(get_libdir)/icedtea${SLOT} \
|
||||
--disable-downloading --disable-Werror \
|
||||
$(use_enable !debug optimizations) \
|
||||
$(use_enable doc docs) \
|
||||
$(use_enable nss) \
|
||||
$(use_enable pulseaudio pulse-java) \
|
||||
$(use_enable systemtap) \
|
||||
$(use_with pax_kernel pax paxctl)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Would use GENTOO_VM otherwise.
|
||||
export ANT_RESPECT_JAVA_HOME=TRUE
|
||||
|
||||
# Load the least that's needed to avoid possible classpath collisions.
|
||||
export ANT_TASKS="ant-nodeps"
|
||||
|
||||
emake
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Use Xvfb for tests
|
||||
unset DISPLAY
|
||||
|
||||
Xemake check
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local dest="/usr/$(get_libdir)/icedtea${SLOT}"
|
||||
local ddest="${ED}/${dest}"
|
||||
dodir "${dest}"
|
||||
|
||||
dodoc README NEWS AUTHORS
|
||||
dosym /usr/share/doc/${PF} /usr/share/doc/${PN}${SLOT}
|
||||
|
||||
cd openjdk.build/j2sdk-image || die
|
||||
|
||||
# Ensures HeadlessGraphicsEnvironment is used.
|
||||
if ! use X; then
|
||||
rm -r jre/lib/$(get_system_arch)/xawt || die
|
||||
fi
|
||||
|
||||
# Don't hide classes
|
||||
rm lib/ct.sym || die
|
||||
|
||||
#402507
|
||||
mkdir jre/.systemPrefs || die
|
||||
touch jre/.systemPrefs/.system.lock || die
|
||||
touch jre/.systemPrefs/.systemRootModFile || die
|
||||
|
||||
# doins can't handle symlinks.
|
||||
cp -vRP bin include jre lib man "${ddest}" || die
|
||||
|
||||
dodoc ASSEMBLY_EXCEPTION THIRD_PARTY_README
|
||||
|
||||
if use doc; then
|
||||
# java-pkg_dohtml needed for package-list #302654
|
||||
java-pkg_dohtml -r ../docs/* || die
|
||||
fi
|
||||
|
||||
if use examples; then
|
||||
dodir "${dest}/share";
|
||||
cp -vRP demo sample "${ddest}/share/" || die
|
||||
fi
|
||||
|
||||
if use source; then
|
||||
cp src.zip "${ddest}" || die
|
||||
fi
|
||||
|
||||
# Fix the permissions.
|
||||
find "${ddest}" \! -type l \( -perm /111 -exec chmod 755 {} \; -o -exec chmod 644 {} \; \) || die
|
||||
|
||||
# Needs to be done before generating cacerts
|
||||
java-vm_set-pax-markings "${ddest}"
|
||||
|
||||
# We need to generate keystore - bug #273306
|
||||
einfo "Generating cacerts file from certificates in ${EPREFIX}/usr/share/ca-certificates/"
|
||||
mkdir "${T}/certgen" && cd "${T}/certgen" || die
|
||||
cp "${FILESDIR}/generate-cacerts.pl" . && chmod +x generate-cacerts.pl || die
|
||||
for c in "${EPREFIX}"/usr/share/ca-certificates/*/*.crt; do
|
||||
openssl x509 -text -in "${c}" >> all.crt || die
|
||||
done
|
||||
./generate-cacerts.pl "${ddest}/bin/keytool" all.crt || die
|
||||
cp -vRP cacerts "${ddest}/jre/lib/security/" || die
|
||||
chmod 644 "${ddest}/jre/lib/security/cacerts" || die
|
||||
|
||||
# OpenJDK7 should be able to use fontconfig instead, but wont hurt to
|
||||
# install it anyway. Bug 390663
|
||||
cp "${FILESDIR}"/fontconfig.Gentoo.properties.src "${T}"/fontconfig.Gentoo.properties || die
|
||||
eprefixify "${T}"/fontconfig.Gentoo.properties
|
||||
insinto "${dest}"/jre/lib
|
||||
doins "${T}"/fontconfig.Gentoo.properties
|
||||
|
||||
set_java_env "${FILESDIR}/icedtea.env"
|
||||
if ! use X || ! use alsa || ! use cups; then
|
||||
java-vm_revdep-mask "${dest}"
|
||||
fi
|
||||
java-vm_sandbox-predict /proc/self/coredump_filter
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if has_version "<=dev-java/icedtea-7.2.0:7"; then
|
||||
# portage would preserve the symlink otherwise, related to bug #384397
|
||||
rm -f "${EROOT}/usr/lib/jvm/icedtea7"
|
||||
elog "To unify the layout and simplify scripts, the identifier of Icedtea-7*"
|
||||
elog "has changed from 'icedtea7' to 'icedtea-7' starting from version 7.2.0-r1"
|
||||
elog "If you had icedtea7 as system VM, the change should be automatic, however"
|
||||
elog "build VM settings in /etc/java-config-2/build/jdk.conf are not changed"
|
||||
elog "and the same holds for any user VM settings. Sorry for the inconvenience."
|
||||
fi
|
||||
}
|
@ -1 +1 @@
|
||||
DIST libusbx-1.0.16.tar.bz2 488428 SHA256 5b335cf9572d793da6ced55bce633894288a8ff39557f07ccc798f2cb74cb580 SHA512 a92fd006afab80c051edc725105bbf1c7b79bdc050fde750d81bf050195e1f19be6217682c0cdf047754eed1be5848c915aac3d5364acc72a8324ce0f8b9e698 WHIRLPOOL dc25709f8f838c28306f6838f23e4907b7f8d1f8b5dd0ec14c649d79f15ed23942a6457034fe2ae25606ed6a584efa41fed6233e6be09e1965a6aa95b5a303ae
|
||||
DIST libusbx-1.0.17.tar.bz2 507441 SHA256 876f8d2c3fee73840a89cb78f3e384c0ab73a67f9155a010b1a5a73ece5145b8 SHA512 fddde538197707e6a97a6ddefab0deeba67f93def1694dac8379589d442c707f8319b1bd9fae6587b25ddaa92ce7894f3ec2e65ddfc031697c15e4c65d251d31 WHIRLPOOL 5ec749741c8c911f7efed28e1ce820ad90d649284801b5a91c9d732c7625943f180e599351aa272760772dfc06047e4303d662df858e52cd4828ab010b63f3f7
|
||||
|
@ -1,141 +0,0 @@
|
||||
From 852efb5a3e82de43cf6288e9904cb254ff636aa0 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Dickens <christopher.a.dickens@gmail.com>
|
||||
Date: Sat, 20 Jul 2013 13:01:41 -0700
|
||||
Subject: [PATCH 2/2] hotplug: Remove use of pthread_cancel from linux_udev
|
||||
|
||||
Using pthread_cancel() presents the opportunity for deadlock, so
|
||||
use a control pipe to cause the event thread to gracefully exit.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
libusb/os/linux_udev.c | 63 ++++++++++++++++++++++++++++++++++++++------------
|
||||
libusb/version_nano.h | 2 +-
|
||||
2 files changed, 49 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/libusb/os/linux_udev.c b/libusb/os/linux_udev.c
|
||||
index 5a2aadf..70f632d 100644
|
||||
--- a/libusb/os/linux_udev.c
|
||||
+++ b/libusb/os/linux_udev.c
|
||||
@@ -46,6 +46,7 @@
|
||||
/* udev context */
|
||||
static struct udev *udev_ctx = NULL;
|
||||
static int udev_monitor_fd = -1;
|
||||
+static int udev_control_pipe[2] = {-1, -1};
|
||||
static struct udev_monitor *udev_monitor = NULL;
|
||||
static pthread_t linux_event_thread;
|
||||
|
||||
@@ -95,14 +96,23 @@ int linux_udev_start_event_monitor(void)
|
||||
goto err_free_monitor;
|
||||
}
|
||||
|
||||
+ r = usbi_pipe(udev_control_pipe);
|
||||
+ if (r) {
|
||||
+ usbi_err(NULL, "could not create udev control pipe");
|
||||
+ goto err_free_monitor;
|
||||
+ }
|
||||
+
|
||||
r = pthread_create(&linux_event_thread, NULL, linux_udev_event_thread_main, NULL);
|
||||
if (r) {
|
||||
usbi_err(NULL, "creating hotplug event thread (%d)", r);
|
||||
- goto err_free_monitor;
|
||||
+ goto err_close_pipe;
|
||||
}
|
||||
|
||||
return LIBUSB_SUCCESS;
|
||||
|
||||
+err_close_pipe:
|
||||
+ close(udev_control_pipe[0]);
|
||||
+ close(udev_control_pipe[1]);
|
||||
err_free_monitor:
|
||||
udev_monitor_unref(udev_monitor);
|
||||
udev_monitor = NULL;
|
||||
@@ -115,14 +125,19 @@ err_free_ctx:
|
||||
|
||||
int linux_udev_stop_event_monitor(void)
|
||||
{
|
||||
+ char dummy = 1;
|
||||
+ int r;
|
||||
+
|
||||
assert(udev_ctx != NULL);
|
||||
assert(udev_monitor != NULL);
|
||||
assert(udev_monitor_fd != -1);
|
||||
|
||||
- /* Cancel the event thread. This is the only way to guarantee the
|
||||
- thread exits since closing the monitor fd won't necessarily cause
|
||||
- poll to return. */
|
||||
- pthread_cancel(linux_event_thread);
|
||||
+ /* Write some dummy data to the control pipe and
|
||||
+ * wait for the thread to exit */
|
||||
+ r = usbi_write(udev_control_pipe[1], &dummy, sizeof(dummy));
|
||||
+ if (r <= 0) {
|
||||
+ usbi_warn(NULL, "udev control pipe signal failed");
|
||||
+ }
|
||||
pthread_join(linux_event_thread, NULL);
|
||||
|
||||
/* Release the udev monitor */
|
||||
@@ -134,27 +149,45 @@ int linux_udev_stop_event_monitor(void)
|
||||
udev_unref(udev_ctx);
|
||||
udev_ctx = NULL;
|
||||
|
||||
+ /* close and reset control pipe */
|
||||
+ close(udev_control_pipe[0]);
|
||||
+ close(udev_control_pipe[1]);
|
||||
+ udev_control_pipe[0] = -1;
|
||||
+ udev_control_pipe[1] = -1;
|
||||
+
|
||||
return LIBUSB_SUCCESS;
|
||||
}
|
||||
|
||||
static void *linux_udev_event_thread_main(void *arg)
|
||||
{
|
||||
+ char dummy;
|
||||
+ int r;
|
||||
struct udev_device* udev_dev;
|
||||
- struct pollfd fds = {.fd = udev_monitor_fd,
|
||||
- .events = POLLIN};
|
||||
+ struct pollfd fds[] = {
|
||||
+ {.fd = udev_control_pipe[0],
|
||||
+ .events = POLLIN},
|
||||
+ {.fd = udev_monitor_fd,
|
||||
+ .events = POLLIN},
|
||||
+ };
|
||||
|
||||
usbi_dbg("udev event thread entering.");
|
||||
|
||||
- while (1 == poll(&fds, 1, -1)) {
|
||||
- if (NULL == udev_monitor || POLLIN != fds.revents) {
|
||||
+ while (poll(fds, 2, -1) >= 0) {
|
||||
+ if (fds[0].revents & POLLIN) {
|
||||
+ /* activity on control pipe, read the byte and exit */
|
||||
+ r = usbi_read(udev_control_pipe[0], &dummy, sizeof(dummy));
|
||||
+ if (r <= 0) {
|
||||
+ usbi_warn(NULL, "udev control pipe read failed");
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
-
|
||||
- usbi_mutex_static_lock(&linux_hotplug_lock);
|
||||
- udev_dev = udev_monitor_receive_device(udev_monitor);
|
||||
- if (udev_dev)
|
||||
- udev_hotplug_event(udev_dev);
|
||||
- usbi_mutex_static_unlock(&linux_hotplug_lock);
|
||||
+ if (fds[1].revents & POLLIN) {
|
||||
+ usbi_mutex_static_lock(&linux_hotplug_lock);
|
||||
+ udev_dev = udev_monitor_receive_device(udev_monitor);
|
||||
+ if (udev_dev)
|
||||
+ udev_hotplug_event(udev_dev);
|
||||
+ usbi_mutex_static_unlock(&linux_hotplug_lock);
|
||||
+ }
|
||||
}
|
||||
|
||||
usbi_dbg("udev event thread exiting");
|
||||
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
|
||||
index 34e26ff..39ad7e3 100644
|
||||
--- a/libusb/version_nano.h
|
||||
+++ b/libusb/version_nano.h
|
||||
@@ -1 +1 @@
|
||||
-#define LIBUSB_NANO 10777
|
||||
+#define LIBUSB_NANO 10778
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,103 +0,0 @@
|
||||
From daf4c9fadaf8a49198c53c039bf78980dc251a4b Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Tue, 30 Jul 2013 15:57:16 +0200
|
||||
Subject: [PATCH 1/2] linux: Use a separate lock to serialize start/stop vs
|
||||
hotplug events
|
||||
|
||||
Using one lock for this is a bad idea, as we should not be holding any
|
||||
locks used by the hotplug thread when trying to stop otherwise the stop
|
||||
function may wait indefinetely in pthread_join, while the event-thread
|
||||
is waiting for the lock the caller of the stop function holds.
|
||||
|
||||
Using 2 separate locks for this should fix this deadlock, which has been
|
||||
reported here: https://bugzilla.redhat.com/show_bug.cgi?id=985484
|
||||
|
||||
Many thanks to Chris Dickens for figuring out the cause of this deadlock!
|
||||
|
||||
CC: Chris Dickens <christopher.a.dickens@gmail.com>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
libusb/os/linux_usbfs.c | 24 +++++++++++++++++-------
|
||||
libusb/version_nano.h | 2 +-
|
||||
2 files changed, 18 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c
|
||||
index 09288af..90e23b7 100644
|
||||
--- a/libusb/os/linux_usbfs.c
|
||||
+++ b/libusb/os/linux_usbfs.c
|
||||
@@ -120,7 +120,9 @@ static int sysfs_has_descriptors = -1;
|
||||
/* how many times have we initted (and not exited) ? */
|
||||
static volatile int init_count = 0;
|
||||
|
||||
-/* Serialize hotplug start/stop, scan-devices, event-thread, and poll */
|
||||
+/* Serialize hotplug start/stop */
|
||||
+usbi_mutex_static_t linux_hotplug_startstop_lock = USBI_MUTEX_INITIALIZER;
|
||||
+/* Serialize scan-devices, event-thread, and poll */
|
||||
usbi_mutex_static_t linux_hotplug_lock = USBI_MUTEX_INITIALIZER;
|
||||
|
||||
static int linux_start_event_monitor(void);
|
||||
@@ -419,7 +421,7 @@ static int op_init(struct libusb_context *ctx)
|
||||
if (sysfs_has_descriptors)
|
||||
usbi_dbg("sysfs has complete descriptors");
|
||||
|
||||
- usbi_mutex_static_lock(&linux_hotplug_lock);
|
||||
+ usbi_mutex_static_lock(&linux_hotplug_startstop_lock);
|
||||
r = LIBUSB_SUCCESS;
|
||||
if (init_count == 0) {
|
||||
/* start up hotplug event handler */
|
||||
@@ -433,20 +435,20 @@ static int op_init(struct libusb_context *ctx)
|
||||
linux_stop_event_monitor();
|
||||
} else
|
||||
usbi_err(ctx, "error starting hotplug event monitor");
|
||||
- usbi_mutex_static_unlock(&linux_hotplug_lock);
|
||||
+ usbi_mutex_static_unlock(&linux_hotplug_startstop_lock);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static void op_exit(void)
|
||||
{
|
||||
- usbi_mutex_static_lock(&linux_hotplug_lock);
|
||||
+ usbi_mutex_static_lock(&linux_hotplug_startstop_lock);
|
||||
assert(init_count != 0);
|
||||
if (!--init_count) {
|
||||
/* tear down event handler */
|
||||
(void)linux_stop_event_monitor();
|
||||
}
|
||||
- usbi_mutex_static_unlock(&linux_hotplug_lock);
|
||||
+ usbi_mutex_static_unlock(&linux_hotplug_startstop_lock);
|
||||
}
|
||||
|
||||
static int linux_start_event_monitor(void)
|
||||
@@ -469,11 +471,19 @@ static int linux_stop_event_monitor(void)
|
||||
|
||||
static int linux_scan_devices(struct libusb_context *ctx)
|
||||
{
|
||||
+ int ret;
|
||||
+
|
||||
+ usbi_mutex_static_lock(&linux_hotplug_lock);
|
||||
+
|
||||
#if defined(USE_UDEV)
|
||||
- return linux_udev_scan_devices(ctx);
|
||||
+ ret = linux_udev_scan_devices(ctx);
|
||||
#else
|
||||
- return linux_default_scan_devices(ctx);
|
||||
+ ret = linux_default_scan_devices(ctx);
|
||||
#endif
|
||||
+
|
||||
+ usbi_mutex_static_unlock(&linux_hotplug_lock);
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static void op_hotplug_poll(void)
|
||||
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
|
||||
index ebf41e1..34e26ff 100644
|
||||
--- a/libusb/version_nano.h
|
||||
+++ b/libusb/version_nano.h
|
||||
@@ -1 +1 @@
|
||||
-#define LIBUSB_NANO 10774
|
||||
+#define LIBUSB_NANO 10777
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,64 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libusbx/libusbx-1.0.16-r2.ebuild,v 1.1 2013/08/05 13:34:08 ssuominen Exp $
|
||||
|
||||
EAPI=5
|
||||
inherit eutils toolchain-funcs
|
||||
|
||||
DESCRIPTION="Userspace access to USB devices"
|
||||
HOMEPAGE="http://libusbx.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="1"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 -x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="debug doc examples static-libs test udev"
|
||||
|
||||
RDEPEND="!dev-libs/libusb:1
|
||||
udev? ( >=virtual/udev-200 )"
|
||||
DEPEND="${RDEPEND}
|
||||
doc? ( app-doc/doxygen )"
|
||||
|
||||
DOCS="AUTHORS ChangeLog NEWS PORTING README THANKS TODO"
|
||||
|
||||
src_prepare() {
|
||||
epatch \
|
||||
"${FILESDIR}"/${P}-linux-Use-a-separate-lock-to-serialize-start-stop-vs.patch \
|
||||
"${FILESDIR}"/${P}-hotplug-Remove-use-of-pthread_cancel-from-linux_udev.patch
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_enable static-libs static) \
|
||||
$(use_enable udev) \
|
||||
$(use_enable debug debug-log) \
|
||||
$(use_enable test tests-build)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
use doc && emake -C doc docs
|
||||
}
|
||||
|
||||
src_test() {
|
||||
default
|
||||
|
||||
# noinst_PROGRAMS from tests/Makefile.am
|
||||
tests/stress || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
gen_usr_ldscript -a usb-1.0
|
||||
|
||||
if use examples; then
|
||||
insinto /usr/share/doc/${PF}/examples
|
||||
doins examples/*.{c,h}
|
||||
fi
|
||||
|
||||
use doc && dohtml doc/html/*
|
||||
|
||||
prune_libtool_files
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue