Merge branch 'master' of git.blshadow.org.ru:gentoo-overlays/smoverlay
This commit is contained in:
commit
3045f1ebb4
|
@ -1,16 +0,0 @@
|
||||||
AUX bareos-12.4.5-Makefile.patch 924 SHA256 0b2428d3ee7ea5ceae4e02d3c315cc6f6b59d21d44749967dd121e29c060942d SHA512 f1b5da39d01f6b00851810c6a0cbcda9ac0561fb165054f6f2c4540943b41af9d524a6a8aca1ae87d55fa8624aecf44c3c0db03c2d7c22690a84c16994289eed WHIRLPOOL 0aeddbe01415260fce862dfa0b387bb5a443b29ed1367ea0fb0c2350c2af24f4f1934497d1590612fa3a3e62e929e5811caa9591e99e5a76fcfc6d73769baa1a
|
|
||||||
AUX bareos-12.4.5-bat-ldflags.patch 389 SHA256 b4b569fecdecbef0b5e0c1bcafddd61a48893ee1e33b52289a455a4773adc9ca SHA512 811fd6ffc2a1c4aeef3afd9001fd2bf01c70ef3f75ed6949ec6b064a9e6ce7a4893ffe464e5c9c67e33fdf92e00b0601500930165891b70d403d31a2ee347434 WHIRLPOOL 488a764b303c3ed077d55bf04ae91e33d24c69c71476d8ad3416608f60a8071471a96f2a539266509b20133d5cf0e0f66ac284aee99f5378030b7a6c394a1987
|
|
||||||
AUX bareos-14.2.2-bpipe.patch 1232 SHA256 bcd4e76545e1306e9bde756f7752266046fde57bd9e553ade60595fb88f96e3a SHA512 3ca51f4c69b0f8d4520b1d0503f09b4f82933e344cdd7fca6f51587bf61502d9320aa0c34b56a1a9dc351348f2e281cb91334a3c31a5207bbdd0fb0d49cef260 WHIRLPOOL 4e22f318639c92d0f504eb48b603f9e777b69e964f133079e69ac903a4b8f233ef84e9658cdbf5d20c4ed9c8f9ea74b5e62708617f2dc80b8b91275a07204b48
|
|
||||||
AUX bareos-14.2.2-dataloss.patch 1743 SHA256 bbb178d111177cb35e7cfcaaccd33e58a29d4fd0ba890ade110483f03fd3b4b8 SHA512 a45f0c25df8049009efd0e9ccf54acd3f5c2ebee72b7413948b60798496508ef29ccb5638a95078794cb7d25bde2710a08f2dee2be3a39ca4e6d5118e1087151 WHIRLPOOL 2886dc578b5ddd4b1d5cdc15741cfc785c8af5f17c830a367a6c8a6aefc52d986407097a0ec52fdfb03cfb1d0fd0add079ca768b523e33082d9c3f7d099c69a3
|
|
||||||
AUX bareos-dir.confd 788 SHA256 9cd4ac430bfc29e9b6c71c24b94fc4d4baa6febaec062b3fc90eb3db86ff8a83 SHA512 85307268abd1bc15e7e1b7ab4d519aa579349f7c61e242aba6cf9d7613a25ad67034b7e8cc12be20d7b0b4ec73100fc859847fe676641f7d36e7b61a6988a7d0 WHIRLPOOL 18d0b42a01c77493d5867a5a17fd7cd5081937da22e0ff027814176398a2bbb5a246a81cfc3a9db3ea405a846e619d36f88063ed8b5b4e7822d71102200e4a21
|
|
||||||
AUX bareos-dir.initd 606 SHA256 c8486c7b97ab77a3bbb857ab6a6183f4cc1877198224115aa824fd65af903f59 SHA512 9393044770b69018702e512a282152aded93f4ade9dc3de73590d69102b81f131f49c12d6d309609758ec6e29276ea7bf730cef86cc30f6f7b3de12405459d92 WHIRLPOOL bca82ad24f660683e75324f3a36be87917faf26369039a644c316b57e2e584c585decd5dfa73f8b981397d73b6d4dc7a52b360254c34c17964eeb494ab3754dd
|
|
||||||
AUX bareos-fd.confd 357 SHA256 f1ecfc6945d1563aec0330943f7e887c99066de3350d84f994f4f5f42fa2e0f4 SHA512 59c4e304f4934c08dc99cbe43f8d989a7bf66d5c8177ce958bd76e4a5b6ef697db21bb79c3c586a1af18f2f3f1e1f350ea2afb7237f7ce86914b20169b7f5612 WHIRLPOOL 41708ac2ee0f90b82ddfbb74cfd41c0c7801fd096caeac32a312b80e6bd48744e23e422a04c3704f40ea717f9e9f70c98dc9885d266f19bb5e470a509236125b
|
|
||||||
AUX bareos-fd.initd 571 SHA256 7ea2ffc24dcb5e6187c65690de3299a0692ec21510ede4d15d33f1e9acf41671 SHA512 68b38ac0db7427b6a86f4cbb3dc886d9842d8c011b63d8d43a47d4a4582ed8801f5a9b7bc728de607798401d15092539baf3d91eed2f2c3526f9b846f61444fd WHIRLPOOL 23811a417775f8852b7cfa91ee7538a6b959f60777c3fa6b38fcffc43397f1c5f78ee12d47bf825eac786eeb349dd5100c4fafc644798919d36d807d4782e5c6
|
|
||||||
AUX bareos-sd.confd 506 SHA256 9842116be1e53c0a592db79cb01d67c36482171bfffba6459c5bfa93a58564b1 SHA512 33e26f6582b08d56936bd75994444fb79a7ee1940ef6e6a1e0ff2194a10e42611404b175330ff77f81ca52215ec8f0a97e05b39e27667560a861cf6b30055f18 WHIRLPOOL bb254d806e40d6e29c5ae284cadcbc7e5cbce0818035ba7c7fb9918970f0d90d85d5bba108d986569e62e7600281faf018253285012b8ee8f5ed0e682f9aff7a
|
|
||||||
AUX bareos-sd.initd 595 SHA256 60317066caec54c6e4b30255affaec7f741e8a88e4fb5fc8346fb018d5dc82ad SHA512 576a1af894bb28ab49eac580dbfb610372da162d69fb091f30b903735c3274c3420604c2628fd121b642385bcc144c3bac1555de9fab34c709fc30b49c8a8e69 WHIRLPOOL 34098ad67131caf4fdd3bea371869bb093cb9765dd5a1a53d1d746aacad57f2c88b523abd5bb8ba391bf07c422a87de7f9320d11dc65981348620e136cb09ccc
|
|
||||||
DIST bareos-14.2.2.tar.gz 3811787 SHA256 8792fe79689f7a1053ecb493ba52258acb29d0998b71d65178a311d46b7cf2bf SHA512 be490ab2f8085975f164ac554cac7d6bbef1af01c8350b5816b2033a37827de4a81bead6ce1e699fe5cc44085dce2b6a0330b91239fb87907e22f9c8dc710156 WHIRLPOOL 384415d553d61e7aa1eaa22611cc9d9eacf8338df82d911409e52a774e756b0539810c60be3dade91eadcc679794ad7c3bb5a155d7d699171f6a4fdead5a5470
|
|
||||||
DIST bareos-14.2.4.tar.gz 3817284 SHA256 d254a472837c2d468d7f4a8551db59e0fa53c2cb3d5354ae16ddf9842a18e604 SHA512 1038de9be5cf465eac4182478b65e2ef7daac871855c1528025271516fe78f29a612c968e1081a27e940d0f3405809ba65edba6c469c03766806263d8d88d3b0 WHIRLPOOL 0cc13c32c986f1f277c71df423dbbe7e475553109a97312623b443bfa1291a98f828f78053a07a142532e2090533619d8b7dcabc62add2958e5c952040f68386
|
|
||||||
DIST bareos-14.2.5.tar.gz 3820963 SHA256 f42bc34afa913cfb4d6b7ef8856c7195d8b13b21c987da1039d46e6c60f06720 SHA512 600cdf8175b1199b73ddcf8a32df7bca446c294c4c830038f93fe3f053482916745675df3a51bc494cdab00b362d57657a34a94e78bac4bae3acced06347023d WHIRLPOOL 361c0edb411c824f128ccb5e27f4d637ecfdf4f2de7a428a8c4eace6d5c23a33a3868cc1b380dcbf6e06d6c7bb71ff222abad923ea9a0bfb74e78f0445c4058b
|
|
||||||
EBUILD bareos-14.2.2.ebuild 11791 SHA256 c8d6b3b245ad679eed766cd3451a59743fc7c4c96048d87b663bdc4b36e652d6 SHA512 d846349e41d7285270c058f6fc68790e3c90818c3845c99c73bcf779c142cceec506d4ad1c9084fb38c444cedee37353db3b6b9323abe63b750014073830a1ee WHIRLPOOL 3bc44e24208d2661247f4cce4f63f608641c908bfe37975b5e338ea2907275cd6f07e1d913e0ec1695023ac21ff7fa3993c1e7353e8a320aad872bfb9353a655
|
|
||||||
EBUILD bareos-14.2.4.ebuild 11582 SHA256 91e96bb47b6c70c127a98cf964c17fffd7e2dd12dfa5b571e6e4f7f64da32f7b SHA512 1e1b9fd0642f0436777f117fd1bd367969683f044a61587378b01baaf6d5dc1049761c80938de41e114ab9c770305afb9c92c67e165412e60297b92980d15b5e WHIRLPOOL f7d0f22ee5ad2709aaca9cd69cb5af945611c91ad697ef9f5927f96ad5e266d168bc7ee79ced9c92642967e048b4c37096c56d40b97862d333c31b610ef4bd1c
|
|
||||||
EBUILD bareos-14.2.5.ebuild 11582 SHA256 91e96bb47b6c70c127a98cf964c17fffd7e2dd12dfa5b571e6e4f7f64da32f7b SHA512 1e1b9fd0642f0436777f117fd1bd367969683f044a61587378b01baaf6d5dc1049761c80938de41e114ab9c770305afb9c92c67e165412e60297b92980d15b5e WHIRLPOOL f7d0f22ee5ad2709aaca9cd69cb5af945611c91ad697ef9f5927f96ad5e266d168bc7ee79ced9c92642967e048b4c37096c56d40b97862d333c31b610ef4bd1c
|
|
|
@ -1,415 +0,0 @@
|
||||||
# Copyright 1999-2015 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/bareos/bareos-14.2.1.ebuild,v 1.6 2015/04/08 07:30:31 mgorny Exp $
|
|
||||||
|
|
||||||
EAPI="5"
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 )
|
|
||||||
PYTHON_REQ_USE="threads"
|
|
||||||
|
|
||||||
inherit eutils multilib python-single-r1 qt4-r2 user
|
|
||||||
|
|
||||||
DESCRIPTION="Featureful client/server network backup suite"
|
|
||||||
HOMEPAGE="http://www.bareos.org/"
|
|
||||||
SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz"
|
|
||||||
RESTRICT="mirror"
|
|
||||||
|
|
||||||
LICENSE="AGPL-3"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS=""
|
|
||||||
IUSE="acl clientonly +director fastlz ipv6 logwatch mysql ndmp postgres python qt4
|
|
||||||
readline scsi-crypto sql-pooling +sqlite3 ssl static +storage-daemon tcpd
|
|
||||||
vim-syntax X cephfs glusterfs lmdb rados"
|
|
||||||
|
|
||||||
DEPEND="
|
|
||||||
!app-backup/bacula
|
|
||||||
cephfs? ( sys-cluster/ceph )
|
|
||||||
rados? ( sys-cluster/ceph )
|
|
||||||
glusterfs? ( sys-cluster/glusterfs )
|
|
||||||
lmdb? ( dev-db/lmdb )
|
|
||||||
dev-libs/gmp:0
|
|
||||||
!clientonly? (
|
|
||||||
postgres? ( dev-db/postgresql:*[threads] )
|
|
||||||
mysql? ( virtual/mysql )
|
|
||||||
sqlite3? ( dev-db/sqlite:3 )
|
|
||||||
director? ( virtual/mta )
|
|
||||||
)
|
|
||||||
qt4? (
|
|
||||||
dev-qt/qtsvg:4
|
|
||||||
x11-libs/qwt:5
|
|
||||||
)
|
|
||||||
fastlz? ( dev-libs/bareos-fastlzlib )
|
|
||||||
logwatch? ( sys-apps/logwatch )
|
|
||||||
tcpd? ( sys-apps/tcp-wrappers )
|
|
||||||
readline? ( sys-libs/readline:0 )
|
|
||||||
static? (
|
|
||||||
acl? ( virtual/acl[static-libs] )
|
|
||||||
sys-libs/zlib[static-libs]
|
|
||||||
dev-libs/lzo[static-libs]
|
|
||||||
sys-libs/ncurses[static-libs]
|
|
||||||
ssl? ( dev-libs/openssl:0[static-libs] )
|
|
||||||
)
|
|
||||||
!static? (
|
|
||||||
acl? ( virtual/acl )
|
|
||||||
dev-libs/lzo
|
|
||||||
ssl? ( dev-libs/openssl:0 )
|
|
||||||
sys-libs/ncurses
|
|
||||||
sys-libs/zlib
|
|
||||||
)
|
|
||||||
python? ( ${PYTHON_DEPS} )
|
|
||||||
"
|
|
||||||
RDEPEND="${DEPEND}
|
|
||||||
!clientonly? (
|
|
||||||
storage-daemon? (
|
|
||||||
sys-block/mtx
|
|
||||||
app-arch/mt-st
|
|
||||||
)
|
|
||||||
)
|
|
||||||
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
|
|
||||||
|
|
||||||
REQUIRED_USE="static? ( clientonly )
|
|
||||||
python? ( ${PYTHON_REQUIRED_USE} )"
|
|
||||||
|
|
||||||
S=${WORKDIR}/${PN}-Release-${PV}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
use mysql && export mydbtypes+="mysql"
|
|
||||||
use postgres && export mydbtypes+=" postgresql"
|
|
||||||
use sqlite3 && export mydbtypes+=" sqlite3"
|
|
||||||
|
|
||||||
# create the daemon group and user
|
|
||||||
if [ -z "$(egetent group bareos 2>/dev/null)" ]; then
|
|
||||||
enewgroup bareos
|
|
||||||
einfo
|
|
||||||
einfo "The group 'bareos' has been created. Any users you add to this"
|
|
||||||
einfo "group have access to files created by the daemons."
|
|
||||||
einfo
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use clientonly && use static && use qt4; then
|
|
||||||
ewarn
|
|
||||||
ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag."
|
|
||||||
ewarn
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! use clientonly; then
|
|
||||||
if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then
|
|
||||||
enewuser bareos -1 -1 /var/lib/bareos bareos,disk,tape,cdrom,cdrw
|
|
||||||
einfo
|
|
||||||
einfo "The user 'bareos' has been created. Please see the bareos manual"
|
|
||||||
einfo "for information about running bareos as a non-root user."
|
|
||||||
einfo
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
use python && python-single-r1_pkg_setup
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
# adjusts default configuration files for several binaries
|
|
||||||
# to /etc/bareos/<config> instead of ./<config>
|
|
||||||
pushd src >&/dev/null || die
|
|
||||||
for f in console/console.c dird/dird.c filed/filed.c \
|
|
||||||
stored/bcopy.c stored/bextract.c stored/bls.c \
|
|
||||||
stored/bscan.c stored/btape.c stored/stored.c \
|
|
||||||
qt-console/main.cpp; do
|
|
||||||
sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \
|
|
||||||
|| die "sed on ${f} failed"
|
|
||||||
done
|
|
||||||
popd >&/dev/null || die
|
|
||||||
|
|
||||||
# bug 466690 Use CXXFLAGS instead of CFLAGS
|
|
||||||
sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
|
|
||||||
|
|
||||||
# stop build for errors in subdirs
|
|
||||||
epatch "${FILESDIR}"/${PN}-12.4.5-Makefile.patch
|
|
||||||
|
|
||||||
# bat needs to respect LDFLAGS
|
|
||||||
epatch "${FILESDIR}"/${PN}-12.4.5-bat-ldflags.patch
|
|
||||||
|
|
||||||
# do not strip binaries
|
|
||||||
for d in filed console dird stored; do
|
|
||||||
sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die
|
|
||||||
done
|
|
||||||
|
|
||||||
# bug 0000422 https://bugs.bareos.org/view.php?id=422
|
|
||||||
epatch "${FILESDIR}/${PN}-14.2.2-bpipe.patch"
|
|
||||||
|
|
||||||
# bug 0000437 https://bugs.bareos.org/view.php?id=437
|
|
||||||
epatch "${FILESDIR}/${PN}-14.2.2-dataloss.patch"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local myconf=''
|
|
||||||
|
|
||||||
if use clientonly; then
|
|
||||||
myconf="${myconf} \
|
|
||||||
$(use_enable clientonly client-only) \
|
|
||||||
$(use_enable !static libtool) \
|
|
||||||
$(use_enable static static-cons) \
|
|
||||||
$(use_enable static static-fd)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# do not build bat and traymonitor if 'static' clientonly
|
|
||||||
if ! use clientonly || ! use static; then
|
|
||||||
myconf="${myconf} \
|
|
||||||
$(use_enable qt4 bat) \
|
|
||||||
$(use_enable qt4 traymonitor)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
myconf="${myconf} \
|
|
||||||
$(use_with X x) \
|
|
||||||
$(use_enable acl) \
|
|
||||||
$(use_enable ipv6) \
|
|
||||||
$(use_enable ndmp) \
|
|
||||||
$(use_enable readline) \
|
|
||||||
$(use_enable !readline conio) \
|
|
||||||
$(use_enable scsi-crypto) \
|
|
||||||
$(use_enable sql-pooling) \
|
|
||||||
$(use_with fastlz) \
|
|
||||||
$(use_with mysql) \
|
|
||||||
$(use_with postgres postgresql) \
|
|
||||||
$(use_with python) \
|
|
||||||
$(use_with readline) \
|
|
||||||
$(use_with sqlite3) \
|
|
||||||
$(use sqlite3 || echo "--without-sqlite3") \
|
|
||||||
$(use_with ssl openssl) \
|
|
||||||
$(use_with tcpd tcp-wrappers) \
|
|
||||||
$(use_enable lmdb) \
|
|
||||||
$(use_with glusterfs) \
|
|
||||||
$(use_with rados) \
|
|
||||||
$(use_with cephfs) \
|
|
||||||
"
|
|
||||||
|
|
||||||
econf \
|
|
||||||
--libdir=/usr/$(get_libdir) \
|
|
||||||
--docdir=/usr/share/doc/${PF} \
|
|
||||||
--htmldir=/usr/share/doc/${PF}/html \
|
|
||||||
--with-pid-dir=/run/bareos \
|
|
||||||
--sysconfdir=/etc/bareos \
|
|
||||||
--with-subsys-dir=/run/lock/subsys \
|
|
||||||
--with-working-dir=/var/lib/bareos \
|
|
||||||
--with-logdir=/var/log/bareos \
|
|
||||||
--with-scriptdir=/usr/libexec/bareos \
|
|
||||||
--with-plugindir=/usr/$(get_libdir)/${PN}/plugin \
|
|
||||||
--with-backenddir=/usr/$(get_libdir)/${PN}/backend \
|
|
||||||
--with-dir-user=bareos \
|
|
||||||
--with-dir-group=bareos \
|
|
||||||
--with-sd-user=root \
|
|
||||||
--with-sd-group=bareos \
|
|
||||||
--with-fd-user=root \
|
|
||||||
--with-fd-group=bareos \
|
|
||||||
--with-sbin-perm=0755 \
|
|
||||||
--with-systemd \
|
|
||||||
--enable-smartalloc \
|
|
||||||
--enable-dynamic-cats-backends \
|
|
||||||
--enable-dynamic-storage-backends \
|
|
||||||
--enable-batch-insert \
|
|
||||||
--disable-afs \
|
|
||||||
--host=${CHOST} \
|
|
||||||
${myconf}
|
|
||||||
# correct configuration for QT based bat
|
|
||||||
if use qt4 ; then
|
|
||||||
pushd src/qt-console
|
|
||||||
eqmake4
|
|
||||||
popd
|
|
||||||
pushd src/qt-tray-monitor
|
|
||||||
eqmake4
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# workaround for build failing with high -j values
|
|
||||||
# if ndmp is enabled
|
|
||||||
use ndmp && MAKEOPTS="$MAKEOPTS -j1"
|
|
||||||
|
|
||||||
# Make build log verbose (bug #447806)
|
|
||||||
emake NO_ECHO=""
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
emake DESTDIR="${D}" install
|
|
||||||
doicon scripts/bareos.png
|
|
||||||
|
|
||||||
# install bat icon and desktop file when enabled
|
|
||||||
# (for some reason ./configure doesn't pick this up)
|
|
||||||
if use qt4 && ! use static ; then
|
|
||||||
doicon src/images/bat.png
|
|
||||||
domenu scripts/bat.desktop
|
|
||||||
fi
|
|
||||||
|
|
||||||
# remove some scripts we don't need at all
|
|
||||||
rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql}
|
|
||||||
rm -f "${D}"/usr/sbin/bareos
|
|
||||||
|
|
||||||
# remove upstream init scripts
|
|
||||||
rm -f "${D}"/etc/init.d/bareos-*
|
|
||||||
|
|
||||||
# rename statically linked apps
|
|
||||||
if use clientonly && use static ; then
|
|
||||||
pushd "${D}"/usr/sbin || die
|
|
||||||
mv static-bareos-fd bareos-fd || die
|
|
||||||
mv static-bconsole bconsole || die
|
|
||||||
popd || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# extra files which 'make install' doesn't cover
|
|
||||||
if ! use clientonly; then
|
|
||||||
# the logrotate configuration
|
|
||||||
# (now unconditional wrt bug #258187)
|
|
||||||
diropts -m0755
|
|
||||||
insinto /etc/logrotate.d
|
|
||||||
insopts -m0644
|
|
||||||
newins "${S}"/scripts/logrotate bareos
|
|
||||||
|
|
||||||
# the logwatch scripts
|
|
||||||
if use logwatch; then
|
|
||||||
diropts -m0750
|
|
||||||
dodir /etc/log.d/scripts/services
|
|
||||||
dodir /etc/log.d/scripts/shared
|
|
||||||
dodir /etc/log.d/conf/logfiles
|
|
||||||
dodir /etc/log.d/conf/services
|
|
||||||
pushd "${S}"/scripts/logwatch >&/dev/null || die
|
|
||||||
emake DESTDIR="${D}" install
|
|
||||||
popd >&/dev/null || die
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
|
|
||||||
if ! use qt4; then
|
|
||||||
rm -vf "${D}"/usr/share/man/man1/bat.1*
|
|
||||||
fi
|
|
||||||
if use clientonly || ! use director; then
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bareos-dir.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bwild.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bregex.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bpluginfo.8*
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/create_*_database
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/drop_*_database
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/make_*_tables
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/update_*_tables
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/drop_*_tables
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup
|
|
||||||
fi
|
|
||||||
if use clientonly || ! use storage-daemon; then
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bareos-sd.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bcopy.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bextract.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bls.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bscan.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/btape.8*
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/disk-changer
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/mtx-changer
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/dvd-handler
|
|
||||||
rm -vf "${D}"/etc/bareos/mtx-changer.conf
|
|
||||||
fi
|
|
||||||
if ! use scsi-crypto; then
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bscrypto.8*
|
|
||||||
fi
|
|
||||||
if ! use qt4; then
|
|
||||||
rm -vf "${D}"/usr/share/man/man1/bareos-tray-monitor.1*
|
|
||||||
fi
|
|
||||||
|
|
||||||
# documentation
|
|
||||||
dodoc README.md
|
|
||||||
use ndmp && dodoc README.NDMP
|
|
||||||
use scsi-crypto && dodoc README.scsicrypto
|
|
||||||
|
|
||||||
# vim-files
|
|
||||||
if use vim-syntax; then
|
|
||||||
insinto /usr/share/vim/vimfiles/syntax
|
|
||||||
doins scripts/bareos.vim
|
|
||||||
insinto /usr/share/vim/vimfiles/ftdetect
|
|
||||||
newins scripts/filetype.vim bareos_ft.vim
|
|
||||||
fi
|
|
||||||
|
|
||||||
# setup init scripts
|
|
||||||
myscripts="bareos-fd"
|
|
||||||
if ! use clientonly; then
|
|
||||||
if use director; then
|
|
||||||
myscripts="${myscripts} bareos-dir"
|
|
||||||
fi
|
|
||||||
if use storage-daemon; then
|
|
||||||
myscripts="${myscripts} bareos-sd"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
for script in ${myscripts}; do
|
|
||||||
# copy over init script and config to a temporary location
|
|
||||||
# so we can modify them as needed
|
|
||||||
cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
|
|
||||||
cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
|
|
||||||
|
|
||||||
# now set the database dependency for the director init script
|
|
||||||
case "${script}" in
|
|
||||||
bareos-dir)
|
|
||||||
sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# install init script and config
|
|
||||||
newinitd "${T}/${script}".initd "${script}"
|
|
||||||
newconfd "${T}/${script}".confd "${script}"
|
|
||||||
done
|
|
||||||
|
|
||||||
# make sure the working directory exists
|
|
||||||
diropts -m0750
|
|
||||||
keepdir /var/lib/bareos
|
|
||||||
|
|
||||||
# make sure bareos group can execute bareos libexec scripts
|
|
||||||
fowners -R root:bareos /usr/libexec/bareos
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
if use clientonly; then
|
|
||||||
fowners root:bareos /var/lib/bareos
|
|
||||||
else
|
|
||||||
fowners bareos:bareos /var/lib/bareos
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! use clientonly && use director; then
|
|
||||||
einfo
|
|
||||||
einfo "If this is a new install, you must create the databases with:"
|
|
||||||
if use postgres; then
|
|
||||||
einfo
|
|
||||||
einfo "For postgresql:"
|
|
||||||
einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'"
|
|
||||||
einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'"
|
|
||||||
einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'"
|
|
||||||
fi
|
|
||||||
if use mysql; then
|
|
||||||
einfo
|
|
||||||
einfo "For mysql:"
|
|
||||||
einfo
|
|
||||||
einfo " Make sure root has direct access to your mysql server. You may want to"
|
|
||||||
einfo " create a /root/.my.cnf file with"
|
|
||||||
einfo " [client]"
|
|
||||||
einfo " user=root"
|
|
||||||
einfo " password=YourPasswordForAccessingMysqlAsRoot"
|
|
||||||
einfo " before running:"
|
|
||||||
einfo " /usr/libexec/bareos/create_bareos_database mysql"
|
|
||||||
einfo " /usr/libexec/bareos/make_bareos_tables mysql"
|
|
||||||
einfo " /usr/libexec/bareos/grant_bareos_privileges mysql"
|
|
||||||
fi
|
|
||||||
einfo
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use sqlite3; then
|
|
||||||
einfo
|
|
||||||
einfo "Be aware that Bareos does not officially support SQLite database."
|
|
||||||
einfo "Best use it only for a client-only installation. See Bug #445540."
|
|
||||||
einfo
|
|
||||||
einfo "It is strongly recommended to use either postgresql or mysql as"
|
|
||||||
einfo "catalog database backend."
|
|
||||||
einfo
|
|
||||||
fi
|
|
||||||
|
|
||||||
einfo "Please note that 'bconsole' will always be installed. To compile 'bat'"
|
|
||||||
einfo "you have to enable 'USE=qt4'."
|
|
||||||
einfo
|
|
||||||
}
|
|
|
@ -1,409 +0,0 @@
|
||||||
# Copyright 1999-2015 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/bareos/bareos-14.2.1.ebuild,v 1.6 2015/04/08 07:30:31 mgorny Exp $
|
|
||||||
|
|
||||||
EAPI="5"
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 )
|
|
||||||
PYTHON_REQ_USE="threads"
|
|
||||||
|
|
||||||
inherit eutils multilib python-single-r1 qt4-r2 user
|
|
||||||
|
|
||||||
DESCRIPTION="Featureful client/server network backup suite"
|
|
||||||
HOMEPAGE="http://www.bareos.org/"
|
|
||||||
SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz"
|
|
||||||
RESTRICT="mirror"
|
|
||||||
|
|
||||||
LICENSE="AGPL-3"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS=""
|
|
||||||
IUSE="acl clientonly +director fastlz ipv6 logwatch mysql ndmp postgres python qt4
|
|
||||||
readline scsi-crypto sql-pooling +sqlite3 ssl static +storage-daemon tcpd
|
|
||||||
vim-syntax X cephfs glusterfs lmdb rados"
|
|
||||||
|
|
||||||
DEPEND="
|
|
||||||
!app-backup/bacula
|
|
||||||
cephfs? ( sys-cluster/ceph )
|
|
||||||
rados? ( sys-cluster/ceph )
|
|
||||||
glusterfs? ( sys-cluster/glusterfs )
|
|
||||||
lmdb? ( dev-db/lmdb )
|
|
||||||
dev-libs/gmp:0
|
|
||||||
!clientonly? (
|
|
||||||
postgres? ( dev-db/postgresql:*[threads] )
|
|
||||||
mysql? ( virtual/mysql )
|
|
||||||
sqlite3? ( dev-db/sqlite:3 )
|
|
||||||
director? ( virtual/mta )
|
|
||||||
)
|
|
||||||
qt4? (
|
|
||||||
dev-qt/qtsvg:4
|
|
||||||
x11-libs/qwt:5
|
|
||||||
)
|
|
||||||
fastlz? ( dev-libs/bareos-fastlzlib )
|
|
||||||
logwatch? ( sys-apps/logwatch )
|
|
||||||
tcpd? ( sys-apps/tcp-wrappers )
|
|
||||||
readline? ( sys-libs/readline:0 )
|
|
||||||
static? (
|
|
||||||
acl? ( virtual/acl[static-libs] )
|
|
||||||
sys-libs/zlib[static-libs]
|
|
||||||
dev-libs/lzo[static-libs]
|
|
||||||
sys-libs/ncurses[static-libs]
|
|
||||||
ssl? ( dev-libs/openssl:0[static-libs] )
|
|
||||||
)
|
|
||||||
!static? (
|
|
||||||
acl? ( virtual/acl )
|
|
||||||
dev-libs/lzo
|
|
||||||
ssl? ( dev-libs/openssl:0 )
|
|
||||||
sys-libs/ncurses
|
|
||||||
sys-libs/zlib
|
|
||||||
)
|
|
||||||
python? ( ${PYTHON_DEPS} )
|
|
||||||
"
|
|
||||||
RDEPEND="${DEPEND}
|
|
||||||
!clientonly? (
|
|
||||||
storage-daemon? (
|
|
||||||
sys-block/mtx
|
|
||||||
app-arch/mt-st
|
|
||||||
)
|
|
||||||
)
|
|
||||||
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
|
|
||||||
|
|
||||||
REQUIRED_USE="static? ( clientonly )
|
|
||||||
python? ( ${PYTHON_REQUIRED_USE} )"
|
|
||||||
|
|
||||||
S=${WORKDIR}/${PN}-Release-${PV}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
use mysql && export mydbtypes+="mysql"
|
|
||||||
use postgres && export mydbtypes+=" postgresql"
|
|
||||||
use sqlite3 && export mydbtypes+=" sqlite3"
|
|
||||||
|
|
||||||
# create the daemon group and user
|
|
||||||
if [ -z "$(egetent group bareos 2>/dev/null)" ]; then
|
|
||||||
enewgroup bareos
|
|
||||||
einfo
|
|
||||||
einfo "The group 'bareos' has been created. Any users you add to this"
|
|
||||||
einfo "group have access to files created by the daemons."
|
|
||||||
einfo
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use clientonly && use static && use qt4; then
|
|
||||||
ewarn
|
|
||||||
ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag."
|
|
||||||
ewarn
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! use clientonly; then
|
|
||||||
if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then
|
|
||||||
enewuser bareos -1 -1 /var/lib/bareos bareos,disk,tape,cdrom,cdrw
|
|
||||||
einfo
|
|
||||||
einfo "The user 'bareos' has been created. Please see the bareos manual"
|
|
||||||
einfo "for information about running bareos as a non-root user."
|
|
||||||
einfo
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
use python && python-single-r1_pkg_setup
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
# adjusts default configuration files for several binaries
|
|
||||||
# to /etc/bareos/<config> instead of ./<config>
|
|
||||||
pushd src >&/dev/null || die
|
|
||||||
for f in console/console.c dird/dird.c filed/filed.c \
|
|
||||||
stored/bcopy.c stored/bextract.c stored/bls.c \
|
|
||||||
stored/bscan.c stored/btape.c stored/stored.c \
|
|
||||||
qt-console/main.cpp; do
|
|
||||||
sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \
|
|
||||||
|| die "sed on ${f} failed"
|
|
||||||
done
|
|
||||||
popd >&/dev/null || die
|
|
||||||
|
|
||||||
# bug 466690 Use CXXFLAGS instead of CFLAGS
|
|
||||||
sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
|
|
||||||
|
|
||||||
# stop build for errors in subdirs
|
|
||||||
epatch "${FILESDIR}"/${PN}-12.4.5-Makefile.patch
|
|
||||||
|
|
||||||
# bat needs to respect LDFLAGS
|
|
||||||
epatch "${FILESDIR}"/${PN}-12.4.5-bat-ldflags.patch
|
|
||||||
|
|
||||||
# do not strip binaries
|
|
||||||
for d in filed console dird stored; do
|
|
||||||
sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local myconf=''
|
|
||||||
|
|
||||||
if use clientonly; then
|
|
||||||
myconf="${myconf} \
|
|
||||||
$(use_enable clientonly client-only) \
|
|
||||||
$(use_enable !static libtool) \
|
|
||||||
$(use_enable static static-cons) \
|
|
||||||
$(use_enable static static-fd)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# do not build bat and traymonitor if 'static' clientonly
|
|
||||||
if ! use clientonly || ! use static; then
|
|
||||||
myconf="${myconf} \
|
|
||||||
$(use_enable qt4 bat) \
|
|
||||||
$(use_enable qt4 traymonitor)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
myconf="${myconf} \
|
|
||||||
$(use_with X x) \
|
|
||||||
$(use_enable acl) \
|
|
||||||
$(use_enable ipv6) \
|
|
||||||
$(use_enable ndmp) \
|
|
||||||
$(use_enable readline) \
|
|
||||||
$(use_enable !readline conio) \
|
|
||||||
$(use_enable scsi-crypto) \
|
|
||||||
$(use_enable sql-pooling) \
|
|
||||||
$(use_with fastlz) \
|
|
||||||
$(use_with mysql) \
|
|
||||||
$(use_with postgres postgresql) \
|
|
||||||
$(use_with python) \
|
|
||||||
$(use_with readline) \
|
|
||||||
$(use_with sqlite3) \
|
|
||||||
$(use sqlite3 || echo "--without-sqlite3") \
|
|
||||||
$(use_with ssl openssl) \
|
|
||||||
$(use_with tcpd tcp-wrappers) \
|
|
||||||
$(use_enable lmdb) \
|
|
||||||
$(use_with glusterfs) \
|
|
||||||
$(use_with rados) \
|
|
||||||
$(use_with cephfs) \
|
|
||||||
"
|
|
||||||
|
|
||||||
econf \
|
|
||||||
--libdir=/usr/$(get_libdir) \
|
|
||||||
--docdir=/usr/share/doc/${PF} \
|
|
||||||
--htmldir=/usr/share/doc/${PF}/html \
|
|
||||||
--with-pid-dir=/run/bareos \
|
|
||||||
--sysconfdir=/etc/bareos \
|
|
||||||
--with-subsys-dir=/run/lock/subsys \
|
|
||||||
--with-working-dir=/var/lib/bareos \
|
|
||||||
--with-logdir=/var/log/bareos \
|
|
||||||
--with-scriptdir=/usr/libexec/bareos \
|
|
||||||
--with-plugindir=/usr/$(get_libdir)/${PN}/plugin \
|
|
||||||
--with-backenddir=/usr/$(get_libdir)/${PN}/backend \
|
|
||||||
--with-dir-user=bareos \
|
|
||||||
--with-dir-group=bareos \
|
|
||||||
--with-sd-user=root \
|
|
||||||
--with-sd-group=bareos \
|
|
||||||
--with-fd-user=root \
|
|
||||||
--with-fd-group=bareos \
|
|
||||||
--with-sbin-perm=0755 \
|
|
||||||
--with-systemd \
|
|
||||||
--enable-smartalloc \
|
|
||||||
--enable-dynamic-cats-backends \
|
|
||||||
--enable-dynamic-storage-backends \
|
|
||||||
--enable-batch-insert \
|
|
||||||
--disable-afs \
|
|
||||||
--host=${CHOST} \
|
|
||||||
${myconf}
|
|
||||||
# correct configuration for QT based bat
|
|
||||||
if use qt4 ; then
|
|
||||||
pushd src/qt-console
|
|
||||||
eqmake4
|
|
||||||
popd
|
|
||||||
pushd src/qt-tray-monitor
|
|
||||||
eqmake4
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# workaround for build failing with high -j values
|
|
||||||
# if ndmp is enabled
|
|
||||||
use ndmp && MAKEOPTS="$MAKEOPTS -j1"
|
|
||||||
|
|
||||||
# Make build log verbose (bug #447806)
|
|
||||||
emake NO_ECHO=""
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
emake DESTDIR="${D}" install
|
|
||||||
doicon scripts/bareos.png
|
|
||||||
|
|
||||||
# install bat icon and desktop file when enabled
|
|
||||||
# (for some reason ./configure doesn't pick this up)
|
|
||||||
if use qt4 && ! use static ; then
|
|
||||||
doicon src/images/bat.png
|
|
||||||
domenu scripts/bat.desktop
|
|
||||||
fi
|
|
||||||
|
|
||||||
# remove some scripts we don't need at all
|
|
||||||
rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql}
|
|
||||||
rm -f "${D}"/usr/sbin/bareos
|
|
||||||
|
|
||||||
# remove upstream init scripts
|
|
||||||
rm -f "${D}"/etc/init.d/bareos-*
|
|
||||||
|
|
||||||
# rename statically linked apps
|
|
||||||
if use clientonly && use static ; then
|
|
||||||
pushd "${D}"/usr/sbin || die
|
|
||||||
mv static-bareos-fd bareos-fd || die
|
|
||||||
mv static-bconsole bconsole || die
|
|
||||||
popd || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# extra files which 'make install' doesn't cover
|
|
||||||
if ! use clientonly; then
|
|
||||||
# the logrotate configuration
|
|
||||||
# (now unconditional wrt bug #258187)
|
|
||||||
diropts -m0755
|
|
||||||
insinto /etc/logrotate.d
|
|
||||||
insopts -m0644
|
|
||||||
newins "${S}"/scripts/logrotate bareos
|
|
||||||
|
|
||||||
# the logwatch scripts
|
|
||||||
if use logwatch; then
|
|
||||||
diropts -m0750
|
|
||||||
dodir /etc/log.d/scripts/services
|
|
||||||
dodir /etc/log.d/scripts/shared
|
|
||||||
dodir /etc/log.d/conf/logfiles
|
|
||||||
dodir /etc/log.d/conf/services
|
|
||||||
pushd "${S}"/scripts/logwatch >&/dev/null || die
|
|
||||||
emake DESTDIR="${D}" install
|
|
||||||
popd >&/dev/null || die
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
|
|
||||||
if ! use qt4; then
|
|
||||||
rm -vf "${D}"/usr/share/man/man1/bat.1*
|
|
||||||
fi
|
|
||||||
if use clientonly || ! use director; then
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bareos-dir.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bwild.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bregex.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bpluginfo.8*
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/create_*_database
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/drop_*_database
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/make_*_tables
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/update_*_tables
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/drop_*_tables
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup
|
|
||||||
fi
|
|
||||||
if use clientonly || ! use storage-daemon; then
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bareos-sd.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bcopy.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bextract.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bls.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bscan.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/btape.8*
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/disk-changer
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/mtx-changer
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/dvd-handler
|
|
||||||
rm -vf "${D}"/etc/bareos/mtx-changer.conf
|
|
||||||
fi
|
|
||||||
if ! use scsi-crypto; then
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bscrypto.8*
|
|
||||||
fi
|
|
||||||
if ! use qt4; then
|
|
||||||
rm -vf "${D}"/usr/share/man/man1/bareos-tray-monitor.1*
|
|
||||||
fi
|
|
||||||
|
|
||||||
# documentation
|
|
||||||
dodoc README.md
|
|
||||||
use ndmp && dodoc README.NDMP
|
|
||||||
use scsi-crypto && dodoc README.scsicrypto
|
|
||||||
|
|
||||||
# vim-files
|
|
||||||
if use vim-syntax; then
|
|
||||||
insinto /usr/share/vim/vimfiles/syntax
|
|
||||||
doins scripts/bareos.vim
|
|
||||||
insinto /usr/share/vim/vimfiles/ftdetect
|
|
||||||
newins scripts/filetype.vim bareos_ft.vim
|
|
||||||
fi
|
|
||||||
|
|
||||||
# setup init scripts
|
|
||||||
myscripts="bareos-fd"
|
|
||||||
if ! use clientonly; then
|
|
||||||
if use director; then
|
|
||||||
myscripts="${myscripts} bareos-dir"
|
|
||||||
fi
|
|
||||||
if use storage-daemon; then
|
|
||||||
myscripts="${myscripts} bareos-sd"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
for script in ${myscripts}; do
|
|
||||||
# copy over init script and config to a temporary location
|
|
||||||
# so we can modify them as needed
|
|
||||||
cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
|
|
||||||
cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
|
|
||||||
|
|
||||||
# now set the database dependency for the director init script
|
|
||||||
case "${script}" in
|
|
||||||
bareos-dir)
|
|
||||||
sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# install init script and config
|
|
||||||
newinitd "${T}/${script}".initd "${script}"
|
|
||||||
newconfd "${T}/${script}".confd "${script}"
|
|
||||||
done
|
|
||||||
|
|
||||||
# make sure the working directory exists
|
|
||||||
diropts -m0750
|
|
||||||
keepdir /var/lib/bareos
|
|
||||||
|
|
||||||
# make sure bareos group can execute bareos libexec scripts
|
|
||||||
fowners -R root:bareos /usr/libexec/bareos
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
if use clientonly; then
|
|
||||||
fowners root:bareos /var/lib/bareos
|
|
||||||
else
|
|
||||||
fowners bareos:bareos /var/lib/bareos
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! use clientonly && use director; then
|
|
||||||
einfo
|
|
||||||
einfo "If this is a new install, you must create the databases with:"
|
|
||||||
if use postgres; then
|
|
||||||
einfo
|
|
||||||
einfo "For postgresql:"
|
|
||||||
einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'"
|
|
||||||
einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'"
|
|
||||||
einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'"
|
|
||||||
fi
|
|
||||||
if use mysql; then
|
|
||||||
einfo
|
|
||||||
einfo "For mysql:"
|
|
||||||
einfo
|
|
||||||
einfo " Make sure root has direct access to your mysql server. You may want to"
|
|
||||||
einfo " create a /root/.my.cnf file with"
|
|
||||||
einfo " [client]"
|
|
||||||
einfo " user=root"
|
|
||||||
einfo " password=YourPasswordForAccessingMysqlAsRoot"
|
|
||||||
einfo " before running:"
|
|
||||||
einfo " /usr/libexec/bareos/create_bareos_database mysql"
|
|
||||||
einfo " /usr/libexec/bareos/make_bareos_tables mysql"
|
|
||||||
einfo " /usr/libexec/bareos/grant_bareos_privileges mysql"
|
|
||||||
fi
|
|
||||||
einfo
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use sqlite3; then
|
|
||||||
einfo
|
|
||||||
einfo "Be aware that Bareos does not officially support SQLite database."
|
|
||||||
einfo "Best use it only for a client-only installation. See Bug #445540."
|
|
||||||
einfo
|
|
||||||
einfo "It is strongly recommended to use either postgresql or mysql as"
|
|
||||||
einfo "catalog database backend."
|
|
||||||
einfo
|
|
||||||
fi
|
|
||||||
|
|
||||||
einfo "Please note that 'bconsole' will always be installed. To compile 'bat'"
|
|
||||||
einfo "you have to enable 'USE=qt4'."
|
|
||||||
einfo
|
|
||||||
}
|
|
|
@ -1,409 +0,0 @@
|
||||||
# Copyright 1999-2015 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/bareos/bareos-14.2.1.ebuild,v 1.6 2015/04/08 07:30:31 mgorny Exp $
|
|
||||||
|
|
||||||
EAPI="5"
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 )
|
|
||||||
PYTHON_REQ_USE="threads"
|
|
||||||
|
|
||||||
inherit eutils multilib python-single-r1 qt4-r2 user
|
|
||||||
|
|
||||||
DESCRIPTION="Featureful client/server network backup suite"
|
|
||||||
HOMEPAGE="http://www.bareos.org/"
|
|
||||||
SRC_URI="https://github.com/${PN}/${PN}/archive/Release/${PV}.tar.gz -> ${P}.tar.gz"
|
|
||||||
RESTRICT="mirror"
|
|
||||||
|
|
||||||
LICENSE="AGPL-3"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS=""
|
|
||||||
IUSE="acl clientonly +director fastlz ipv6 logwatch mysql ndmp postgres python qt4
|
|
||||||
readline scsi-crypto sql-pooling +sqlite3 ssl static +storage-daemon tcpd
|
|
||||||
vim-syntax X cephfs glusterfs lmdb rados"
|
|
||||||
|
|
||||||
DEPEND="
|
|
||||||
!app-backup/bacula
|
|
||||||
cephfs? ( sys-cluster/ceph )
|
|
||||||
rados? ( sys-cluster/ceph )
|
|
||||||
glusterfs? ( sys-cluster/glusterfs )
|
|
||||||
lmdb? ( dev-db/lmdb )
|
|
||||||
dev-libs/gmp:0
|
|
||||||
!clientonly? (
|
|
||||||
postgres? ( dev-db/postgresql:*[threads] )
|
|
||||||
mysql? ( virtual/mysql )
|
|
||||||
sqlite3? ( dev-db/sqlite:3 )
|
|
||||||
director? ( virtual/mta )
|
|
||||||
)
|
|
||||||
qt4? (
|
|
||||||
dev-qt/qtsvg:4
|
|
||||||
x11-libs/qwt:5
|
|
||||||
)
|
|
||||||
fastlz? ( dev-libs/bareos-fastlzlib )
|
|
||||||
logwatch? ( sys-apps/logwatch )
|
|
||||||
tcpd? ( sys-apps/tcp-wrappers )
|
|
||||||
readline? ( sys-libs/readline:0 )
|
|
||||||
static? (
|
|
||||||
acl? ( virtual/acl[static-libs] )
|
|
||||||
sys-libs/zlib[static-libs]
|
|
||||||
dev-libs/lzo[static-libs]
|
|
||||||
sys-libs/ncurses[static-libs]
|
|
||||||
ssl? ( dev-libs/openssl:0[static-libs] )
|
|
||||||
)
|
|
||||||
!static? (
|
|
||||||
acl? ( virtual/acl )
|
|
||||||
dev-libs/lzo
|
|
||||||
ssl? ( dev-libs/openssl:0 )
|
|
||||||
sys-libs/ncurses
|
|
||||||
sys-libs/zlib
|
|
||||||
)
|
|
||||||
python? ( ${PYTHON_DEPS} )
|
|
||||||
"
|
|
||||||
RDEPEND="${DEPEND}
|
|
||||||
!clientonly? (
|
|
||||||
storage-daemon? (
|
|
||||||
sys-block/mtx
|
|
||||||
app-arch/mt-st
|
|
||||||
)
|
|
||||||
)
|
|
||||||
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
|
|
||||||
|
|
||||||
REQUIRED_USE="static? ( clientonly )
|
|
||||||
python? ( ${PYTHON_REQUIRED_USE} )"
|
|
||||||
|
|
||||||
S=${WORKDIR}/${PN}-Release-${PV}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
use mysql && export mydbtypes+="mysql"
|
|
||||||
use postgres && export mydbtypes+=" postgresql"
|
|
||||||
use sqlite3 && export mydbtypes+=" sqlite3"
|
|
||||||
|
|
||||||
# create the daemon group and user
|
|
||||||
if [ -z "$(egetent group bareos 2>/dev/null)" ]; then
|
|
||||||
enewgroup bareos
|
|
||||||
einfo
|
|
||||||
einfo "The group 'bareos' has been created. Any users you add to this"
|
|
||||||
einfo "group have access to files created by the daemons."
|
|
||||||
einfo
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use clientonly && use static && use qt4; then
|
|
||||||
ewarn
|
|
||||||
ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag."
|
|
||||||
ewarn
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! use clientonly; then
|
|
||||||
if [ -z "$(egetent passwd bareos 2>/dev/null)" ]; then
|
|
||||||
enewuser bareos -1 -1 /var/lib/bareos bareos,disk,tape,cdrom,cdrw
|
|
||||||
einfo
|
|
||||||
einfo "The user 'bareos' has been created. Please see the bareos manual"
|
|
||||||
einfo "for information about running bareos as a non-root user."
|
|
||||||
einfo
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
use python && python-single-r1_pkg_setup
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
# adjusts default configuration files for several binaries
|
|
||||||
# to /etc/bareos/<config> instead of ./<config>
|
|
||||||
pushd src >&/dev/null || die
|
|
||||||
for f in console/console.c dird/dird.c filed/filed.c \
|
|
||||||
stored/bcopy.c stored/bextract.c stored/bls.c \
|
|
||||||
stored/bscan.c stored/btape.c stored/stored.c \
|
|
||||||
qt-console/main.cpp; do
|
|
||||||
sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bareos/|g' "${f}" \
|
|
||||||
|| die "sed on ${f} failed"
|
|
||||||
done
|
|
||||||
popd >&/dev/null || die
|
|
||||||
|
|
||||||
# bug 466690 Use CXXFLAGS instead of CFLAGS
|
|
||||||
sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
|
|
||||||
|
|
||||||
# stop build for errors in subdirs
|
|
||||||
epatch "${FILESDIR}"/${PN}-12.4.5-Makefile.patch
|
|
||||||
|
|
||||||
# bat needs to respect LDFLAGS
|
|
||||||
epatch "${FILESDIR}"/${PN}-12.4.5-bat-ldflags.patch
|
|
||||||
|
|
||||||
# do not strip binaries
|
|
||||||
for d in filed console dird stored; do
|
|
||||||
sed -i -e "s/strip /# strip /" src/$d/Makefile.in || die
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local myconf=''
|
|
||||||
|
|
||||||
if use clientonly; then
|
|
||||||
myconf="${myconf} \
|
|
||||||
$(use_enable clientonly client-only) \
|
|
||||||
$(use_enable !static libtool) \
|
|
||||||
$(use_enable static static-cons) \
|
|
||||||
$(use_enable static static-fd)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# do not build bat and traymonitor if 'static' clientonly
|
|
||||||
if ! use clientonly || ! use static; then
|
|
||||||
myconf="${myconf} \
|
|
||||||
$(use_enable qt4 bat) \
|
|
||||||
$(use_enable qt4 traymonitor)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
myconf="${myconf} \
|
|
||||||
$(use_with X x) \
|
|
||||||
$(use_enable acl) \
|
|
||||||
$(use_enable ipv6) \
|
|
||||||
$(use_enable ndmp) \
|
|
||||||
$(use_enable readline) \
|
|
||||||
$(use_enable !readline conio) \
|
|
||||||
$(use_enable scsi-crypto) \
|
|
||||||
$(use_enable sql-pooling) \
|
|
||||||
$(use_with fastlz) \
|
|
||||||
$(use_with mysql) \
|
|
||||||
$(use_with postgres postgresql) \
|
|
||||||
$(use_with python) \
|
|
||||||
$(use_with readline) \
|
|
||||||
$(use_with sqlite3) \
|
|
||||||
$(use sqlite3 || echo "--without-sqlite3") \
|
|
||||||
$(use_with ssl openssl) \
|
|
||||||
$(use_with tcpd tcp-wrappers) \
|
|
||||||
$(use_enable lmdb) \
|
|
||||||
$(use_with glusterfs) \
|
|
||||||
$(use_with rados) \
|
|
||||||
$(use_with cephfs) \
|
|
||||||
"
|
|
||||||
|
|
||||||
econf \
|
|
||||||
--libdir=/usr/$(get_libdir) \
|
|
||||||
--docdir=/usr/share/doc/${PF} \
|
|
||||||
--htmldir=/usr/share/doc/${PF}/html \
|
|
||||||
--with-pid-dir=/run/bareos \
|
|
||||||
--sysconfdir=/etc/bareos \
|
|
||||||
--with-subsys-dir=/run/lock/subsys \
|
|
||||||
--with-working-dir=/var/lib/bareos \
|
|
||||||
--with-logdir=/var/log/bareos \
|
|
||||||
--with-scriptdir=/usr/libexec/bareos \
|
|
||||||
--with-plugindir=/usr/$(get_libdir)/${PN}/plugin \
|
|
||||||
--with-backenddir=/usr/$(get_libdir)/${PN}/backend \
|
|
||||||
--with-dir-user=bareos \
|
|
||||||
--with-dir-group=bareos \
|
|
||||||
--with-sd-user=root \
|
|
||||||
--with-sd-group=bareos \
|
|
||||||
--with-fd-user=root \
|
|
||||||
--with-fd-group=bareos \
|
|
||||||
--with-sbin-perm=0755 \
|
|
||||||
--with-systemd \
|
|
||||||
--enable-smartalloc \
|
|
||||||
--enable-dynamic-cats-backends \
|
|
||||||
--enable-dynamic-storage-backends \
|
|
||||||
--enable-batch-insert \
|
|
||||||
--disable-afs \
|
|
||||||
--host=${CHOST} \
|
|
||||||
${myconf}
|
|
||||||
# correct configuration for QT based bat
|
|
||||||
if use qt4 ; then
|
|
||||||
pushd src/qt-console
|
|
||||||
eqmake4
|
|
||||||
popd
|
|
||||||
pushd src/qt-tray-monitor
|
|
||||||
eqmake4
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# workaround for build failing with high -j values
|
|
||||||
# if ndmp is enabled
|
|
||||||
use ndmp && MAKEOPTS="$MAKEOPTS -j1"
|
|
||||||
|
|
||||||
# Make build log verbose (bug #447806)
|
|
||||||
emake NO_ECHO=""
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
emake DESTDIR="${D}" install
|
|
||||||
doicon scripts/bareos.png
|
|
||||||
|
|
||||||
# install bat icon and desktop file when enabled
|
|
||||||
# (for some reason ./configure doesn't pick this up)
|
|
||||||
if use qt4 && ! use static ; then
|
|
||||||
doicon src/images/bat.png
|
|
||||||
domenu scripts/bat.desktop
|
|
||||||
fi
|
|
||||||
|
|
||||||
# remove some scripts we don't need at all
|
|
||||||
rm -f "${D}"/usr/libexec/bareos/{bareos,bareos-ctl-dir,bareos-ctl-fd,bareos-ctl-sd,startmysql,stopmysql}
|
|
||||||
rm -f "${D}"/usr/sbin/bareos
|
|
||||||
|
|
||||||
# remove upstream init scripts
|
|
||||||
rm -f "${D}"/etc/init.d/bareos-*
|
|
||||||
|
|
||||||
# rename statically linked apps
|
|
||||||
if use clientonly && use static ; then
|
|
||||||
pushd "${D}"/usr/sbin || die
|
|
||||||
mv static-bareos-fd bareos-fd || die
|
|
||||||
mv static-bconsole bconsole || die
|
|
||||||
popd || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
# extra files which 'make install' doesn't cover
|
|
||||||
if ! use clientonly; then
|
|
||||||
# the logrotate configuration
|
|
||||||
# (now unconditional wrt bug #258187)
|
|
||||||
diropts -m0755
|
|
||||||
insinto /etc/logrotate.d
|
|
||||||
insopts -m0644
|
|
||||||
newins "${S}"/scripts/logrotate bareos
|
|
||||||
|
|
||||||
# the logwatch scripts
|
|
||||||
if use logwatch; then
|
|
||||||
diropts -m0750
|
|
||||||
dodir /etc/log.d/scripts/services
|
|
||||||
dodir /etc/log.d/scripts/shared
|
|
||||||
dodir /etc/log.d/conf/logfiles
|
|
||||||
dodir /etc/log.d/conf/services
|
|
||||||
pushd "${S}"/scripts/logwatch >&/dev/null || die
|
|
||||||
emake DESTDIR="${D}" install
|
|
||||||
popd >&/dev/null || die
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -vf "${D}"/usr/share/man/man1/bareos-bwxconsole.1*
|
|
||||||
if ! use qt4; then
|
|
||||||
rm -vf "${D}"/usr/share/man/man1/bat.1*
|
|
||||||
fi
|
|
||||||
if use clientonly || ! use director; then
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bareos-dir.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bareos-dbcheck.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bwild.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bregex.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bpluginfo.8*
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/create_*_database
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/drop_*_database
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/make_*_tables
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/update_*_tables
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/drop_*_tables
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/grant_*_privileges
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/*_catalog_backup
|
|
||||||
fi
|
|
||||||
if use clientonly || ! use storage-daemon; then
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bareos-sd.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bcopy.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bextract.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bls.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bscan.8*
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/btape.8*
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/disk-changer
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/mtx-changer
|
|
||||||
rm -vf "${D}"/usr/libexec/bareos/dvd-handler
|
|
||||||
rm -vf "${D}"/etc/bareos/mtx-changer.conf
|
|
||||||
fi
|
|
||||||
if ! use scsi-crypto; then
|
|
||||||
rm -vf "${D}"/usr/share/man/man8/bscrypto.8*
|
|
||||||
fi
|
|
||||||
if ! use qt4; then
|
|
||||||
rm -vf "${D}"/usr/share/man/man1/bareos-tray-monitor.1*
|
|
||||||
fi
|
|
||||||
|
|
||||||
# documentation
|
|
||||||
dodoc README.md
|
|
||||||
use ndmp && dodoc README.NDMP
|
|
||||||
use scsi-crypto && dodoc README.scsicrypto
|
|
||||||
|
|
||||||
# vim-files
|
|
||||||
if use vim-syntax; then
|
|
||||||
insinto /usr/share/vim/vimfiles/syntax
|
|
||||||
doins scripts/bareos.vim
|
|
||||||
insinto /usr/share/vim/vimfiles/ftdetect
|
|
||||||
newins scripts/filetype.vim bareos_ft.vim
|
|
||||||
fi
|
|
||||||
|
|
||||||
# setup init scripts
|
|
||||||
myscripts="bareos-fd"
|
|
||||||
if ! use clientonly; then
|
|
||||||
if use director; then
|
|
||||||
myscripts="${myscripts} bareos-dir"
|
|
||||||
fi
|
|
||||||
if use storage-daemon; then
|
|
||||||
myscripts="${myscripts} bareos-sd"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
for script in ${myscripts}; do
|
|
||||||
# copy over init script and config to a temporary location
|
|
||||||
# so we can modify them as needed
|
|
||||||
cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
|
|
||||||
cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
|
|
||||||
|
|
||||||
# now set the database dependency for the director init script
|
|
||||||
case "${script}" in
|
|
||||||
bareos-dir)
|
|
||||||
sed -i -e "s:%databasetypes%:${mydbtypes}:" "${T}/${script}".confd || die
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# install init script and config
|
|
||||||
newinitd "${T}/${script}".initd "${script}"
|
|
||||||
newconfd "${T}/${script}".confd "${script}"
|
|
||||||
done
|
|
||||||
|
|
||||||
# make sure the working directory exists
|
|
||||||
diropts -m0750
|
|
||||||
keepdir /var/lib/bareos
|
|
||||||
|
|
||||||
# make sure bareos group can execute bareos libexec scripts
|
|
||||||
fowners -R root:bareos /usr/libexec/bareos
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
if use clientonly; then
|
|
||||||
fowners root:bareos /var/lib/bareos
|
|
||||||
else
|
|
||||||
fowners bareos:bareos /var/lib/bareos
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! use clientonly && use director; then
|
|
||||||
einfo
|
|
||||||
einfo "If this is a new install, you must create the databases with:"
|
|
||||||
if use postgres; then
|
|
||||||
einfo
|
|
||||||
einfo "For postgresql:"
|
|
||||||
einfo " su postgres -c '/usr/libexec/bareos/create_bareos_database postgresql'"
|
|
||||||
einfo " su postgres -c '/usr/libexec/bareos/make_bareos_tables postgresql'"
|
|
||||||
einfo " su postgres -c '/usr/libexec/bareos/grant_bareos_privileges postgresql'"
|
|
||||||
fi
|
|
||||||
if use mysql; then
|
|
||||||
einfo
|
|
||||||
einfo "For mysql:"
|
|
||||||
einfo
|
|
||||||
einfo " Make sure root has direct access to your mysql server. You may want to"
|
|
||||||
einfo " create a /root/.my.cnf file with"
|
|
||||||
einfo " [client]"
|
|
||||||
einfo " user=root"
|
|
||||||
einfo " password=YourPasswordForAccessingMysqlAsRoot"
|
|
||||||
einfo " before running:"
|
|
||||||
einfo " /usr/libexec/bareos/create_bareos_database mysql"
|
|
||||||
einfo " /usr/libexec/bareos/make_bareos_tables mysql"
|
|
||||||
einfo " /usr/libexec/bareos/grant_bareos_privileges mysql"
|
|
||||||
fi
|
|
||||||
einfo
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use sqlite3; then
|
|
||||||
einfo
|
|
||||||
einfo "Be aware that Bareos does not officially support SQLite database."
|
|
||||||
einfo "Best use it only for a client-only installation. See Bug #445540."
|
|
||||||
einfo
|
|
||||||
einfo "It is strongly recommended to use either postgresql or mysql as"
|
|
||||||
einfo "catalog database backend."
|
|
||||||
einfo
|
|
||||||
fi
|
|
||||||
|
|
||||||
einfo "Please note that 'bconsole' will always be installed. To compile 'bat'"
|
|
||||||
einfo "you have to enable 'USE=qt4'."
|
|
||||||
einfo
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
# stop build if there are errors in subdirs
|
|
||||||
--- Makefile.in.orig 2010-07-20 16:53:44.000000000 +0000
|
|
||||||
+++ Makefile.in 2010-07-20 16:55:50.000000000 +0000
|
|
||||||
@@ -44,9 +44,8 @@
|
|
||||||
|
|
||||||
all: Makefile
|
|
||||||
@for I in ${all_subdirs}; \
|
|
||||||
- do (cd $$I; echo "==>Entering directory `pwd`"; \
|
|
||||||
- $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
|
|
||||||
- echo ""; echo ""; exit 1;)); \
|
|
||||||
+ do \
|
|
||||||
+ $(MAKE) DESTDIR=$(DESTDIR) -C $$I $@ || exit 1; \
|
|
||||||
done
|
|
||||||
|
|
||||||
depend:
|
|
||||||
@@ -55,9 +54,8 @@
|
|
||||||
|
|
||||||
bacula-fd: Makefile
|
|
||||||
@for I in ${fd_subdirs}; \
|
|
||||||
- do (cd $$I; echo "==>Entering directory `pwd`"; \
|
|
||||||
- $(MAKE) DESTDIR=$(DESTDIR) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
|
|
||||||
- echo ""; echo ""; exit 1;)); \
|
|
||||||
+ do \
|
|
||||||
+ $(MAKE) DESTDIR=$(DESTDIR) -C $$I all || exit 1; \
|
|
||||||
done
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
|
@ -1,11 +0,0 @@
|
||||||
# bat needs to respect LDFLAGS
|
|
||||||
--- src/qt-console/bat.pro.in.orig 2010-07-20 18:28:50.000000000 +0000
|
|
||||||
+++ src/qt-console/bat.pro.in 2010-07-20 18:29:25.000000000 +0000
|
|
||||||
@@ -26,6 +26,7 @@
|
|
||||||
QMAKE_LINK = $${LIBTOOL_LINK} $(CXX)
|
|
||||||
QMAKE_INSTALL_PROGRAM = $${LIBTOOL_INSTALL} install -m @SBINPERM@ -p
|
|
||||||
QMAKE_CLEAN += .libs/* bat
|
|
||||||
+QMAKE_LFLAGS += @LDFLAGS@
|
|
||||||
|
|
||||||
qwt {
|
|
||||||
INCLUDEPATH += @QWT_INC@
|
|
|
@ -1,29 +0,0 @@
|
||||||
From c4baf251aeee31ecc91f1c24803a9b73a7311b8c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Marco van Wieringen <marco.van.wieringen@bareos.com>
|
|
||||||
Date: Tue, 3 Feb 2015 15:45:41 +0100
|
|
||||||
Subject: [PATCH] Use argument_value not argument in bpipe config parser.
|
|
||||||
|
|
||||||
Fixes #422: bpipe plugin: Error closing stream for pseudo file file:
|
|
||||||
---
|
|
||||||
src/plugins/filed/bpipe-fd.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/plugins/filed/bpipe-fd.c b/src/plugins/filed/bpipe-fd.c
|
|
||||||
index 87db794..0e9e1e0 100644
|
|
||||||
--- a/src/plugins/filed/bpipe-fd.c
|
|
||||||
+++ b/src/plugins/filed/bpipe-fd.c
|
|
||||||
@@ -823,12 +823,12 @@ static bRC parse_plugin_definition(bpContext *ctx, void *value)
|
|
||||||
/*
|
|
||||||
* Keep the first value, ignore any next setting.
|
|
||||||
*/
|
|
||||||
- set_string_if_null(str_destination, argument);
|
|
||||||
+ set_string_if_null(str_destination, argument_value);
|
|
||||||
} else {
|
|
||||||
/*
|
|
||||||
* Overwrite any existing value.
|
|
||||||
*/
|
|
||||||
- set_string(str_destination, argument);
|
|
||||||
+ set_string(str_destination, argument_value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
From 263240eaa911563a8468ecdaf7d4957201b41426 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Marco van Wieringen <marco.van.wieringen@bareos.com>
|
|
||||||
Date: Fri, 13 Mar 2015 18:32:58 +0100
|
|
||||||
Subject: [PATCH] Don't trash dcr->rec while doing autolabeling.
|
|
||||||
|
|
||||||
Fixes #437: When storing on multiple volumes via File backend, a data
|
|
||||||
block of 64k gets lost
|
|
||||||
---
|
|
||||||
src/stored/label.c | 14 +++++++++-----
|
|
||||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/stored/label.c b/src/stored/label.c
|
|
||||||
index deeb169..4cbfb64 100644
|
|
||||||
--- a/src/stored/label.c
|
|
||||||
+++ b/src/stored/label.c
|
|
||||||
@@ -341,6 +341,7 @@ static bool write_volume_label_to_block(DCR *dcr)
|
|
||||||
bool write_new_volume_label_to_dev(DCR *dcr, const char *VolName,
|
|
||||||
const char *PoolName, bool relabel)
|
|
||||||
{
|
|
||||||
+ DEV_RECORD *rec;
|
|
||||||
JCR *jcr = dcr->jcr;
|
|
||||||
DEVICE *dev = dcr->dev;
|
|
||||||
DEV_BLOCK *block = dcr->block;
|
|
||||||
@@ -418,15 +419,18 @@ bool write_new_volume_label_to_dev(DCR *dcr, const char *VolName,
|
|
||||||
goto bail_out;
|
|
||||||
}
|
|
||||||
|
|
||||||
- create_volume_label_record(dcr, dev, dcr->rec);
|
|
||||||
- dcr->rec->Stream = 0;
|
|
||||||
- dcr->rec->maskedStream = 0;
|
|
||||||
+ rec = new_record();
|
|
||||||
+ create_volume_label_record(dcr, dev, rec);
|
|
||||||
+ rec->Stream = 0;
|
|
||||||
+ rec->maskedStream = 0;
|
|
||||||
|
|
||||||
- if (!write_record_to_block(dcr, dcr->rec)) {
|
|
||||||
+ if (!write_record_to_block(dcr, rec)) {
|
|
||||||
Dmsg2(130, "Bad Label write on %s: ERR=%s\n", dev->print_name(), dev->print_errmsg());
|
|
||||||
+ free_record(rec);
|
|
||||||
goto bail_out;
|
|
||||||
} else {
|
|
||||||
- Dmsg2(130, "Wrote label of %d bytes to %s\n", dcr->rec->data_len, dev->print_name());
|
|
||||||
+ Dmsg2(130, "Wrote label of %d bytes to %s\n", rec->data_len, dev->print_name());
|
|
||||||
+ free_record(rec);
|
|
||||||
}
|
|
||||||
|
|
||||||
Dmsg0(130, "Call write_block_to_dev()\n");
|
|
|
@ -1,18 +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/bareos/files/bareos-dir.confd,v 1.1 2013/10/21 21:52:50 mschiff Exp $
|
|
||||||
|
|
||||||
# Config file for /etc/init.d/bareos-dir
|
|
||||||
|
|
||||||
# Bareos can use more than one catalog database and each one can
|
|
||||||
# be of any supported type.
|
|
||||||
# If a database server where you store a bareos catalog
|
|
||||||
# is on a different machine, you might want to remove the corresponding
|
|
||||||
# type from the rc_need variable.
|
|
||||||
rc_need="%databasetypes%"
|
|
||||||
|
|
||||||
# Options for the director daemon.
|
|
||||||
# The director can be run as a non-root user, however
|
|
||||||
# please ensure that this user has proper permissions to
|
|
||||||
# access your backup devices.
|
|
||||||
DIR_OPTIONS="-u root -g bareos -c /etc/bareos/bareos-dir.conf"
|
|
|
@ -1,22 +0,0 @@
|
||||||
#!/sbin/runscript
|
|
||||||
# Copyright 1999-2014 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/bareos/files/bareos-dir.initd,v 1.4 2014/05/04 17:03:59 mschiff Exp $
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
use dns bareos-fd bareos-sd
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
ebegin "Starting bareos director"
|
|
||||||
checkpath -d -m 0750 -o bareos:bareos /run/bareos
|
|
||||||
start-stop-daemon --start --quiet --exec /usr/sbin/bareos-dir \
|
|
||||||
-- ${DIR_OPTIONS}
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
ebegin "Stopping bareos director"
|
|
||||||
start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-dir.*.pid
|
|
||||||
eend $?
|
|
||||||
}
|
|
|
@ -1,8 +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/bareos/files/bareos-fd.confd,v 1.1 2013/10/21 21:52:50 mschiff Exp $
|
|
||||||
|
|
||||||
# Config file for /etc/init.d/bareos-fd
|
|
||||||
|
|
||||||
# Options for the file daemon.
|
|
||||||
FD_OPTIONS="-u root -g bareos -c /etc/bareos/bareos-fd.conf"
|
|
|
@ -1,22 +0,0 @@
|
||||||
#!/sbin/runscript
|
|
||||||
# Copyright 1999-2014 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/bareos/files/bareos-fd.initd,v 1.5 2014/05/20 23:18:41 mschiff Exp $
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
use dns
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
ebegin "Starting bareos file daemon"
|
|
||||||
checkpath -d -m 0750 /run/bareos
|
|
||||||
start-stop-daemon --start --quiet --exec /usr/sbin/bareos-fd \
|
|
||||||
-- ${FD_OPTIONS}
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
ebegin "Stopping bareos file daemon"
|
|
||||||
start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-fd.*.pid
|
|
||||||
eend $?
|
|
||||||
}
|
|
|
@ -1,11 +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/bareos/files/bareos-sd.confd,v 1.1 2013/10/21 21:52:50 mschiff Exp $
|
|
||||||
|
|
||||||
# Config file for /etc/init.d/bareos-sd
|
|
||||||
|
|
||||||
# Options for the storage daemon.
|
|
||||||
# The storage daemon can be run as a non-root user, however
|
|
||||||
# please ensure that this user has proper permissions to
|
|
||||||
# access your backup devices.
|
|
||||||
SD_OPTIONS="-u root -g bareos -c /etc/bareos/bareos-sd.conf"
|
|
|
@ -1,22 +0,0 @@
|
||||||
#!/sbin/runscript
|
|
||||||
# Copyright 1999-2014 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/bareos/files/bareos-sd.initd,v 1.4 2014/05/04 17:03:59 mschiff Exp $
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
use dns
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
ebegin "Starting bareos storage daemon"
|
|
||||||
checkpath -d -m 0750 -o bareos:bareos /run/bareos
|
|
||||||
start-stop-daemon --start --quiet --exec /usr/sbin/bareos-sd \
|
|
||||||
-- ${SD_OPTIONS}
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
ebegin "Stopping bareos storage daemon"
|
|
||||||
start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-sd.*.pid
|
|
||||||
eend $?
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
EBUILD gitlab-shell-2.6.9.ebuild 2783 SHA256 bcb7ce5594785e8bbe4da4817e37fb9ea5c674cc704da48df228ff77d04fe182 SHA512 14c1089278f77482653540b1df9ec64d8b7aefcd900625592377834a3ad9cb9068a56dd98e8f6019e80fad233e920b4ffde743f9b09b1deacac323efe86acd1f WHIRLPOOL 56e63a5aa0b0f40f76c060c3785a263eb42bb427554cdd346ee07364b647d009b5e9c7d1a285a74ffcc70b7538ad6a8a5b2cb4ee99430b75d828fc1a284599b5
|
|
|
@ -1,101 +0,0 @@
|
||||||
# Copyright 1999-2013 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: $
|
|
||||||
|
|
||||||
EAPI="5"
|
|
||||||
|
|
||||||
EGIT_REPO_URI="https://github.com/gitlabhq/gitlab-shell.git"
|
|
||||||
EGIT_COMMIT="v${PV}"
|
|
||||||
USE_RUBY="ruby20"
|
|
||||||
|
|
||||||
inherit eutils git-2 ruby-ng user
|
|
||||||
|
|
||||||
DESCRIPTION="GitLab Shell is a free SSH access and repository management application"
|
|
||||||
HOMEPAGE="https://github.com/gitlabhq/gitlab-shell"
|
|
||||||
LICENSE="MIT"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~x86 ~arm"
|
|
||||||
|
|
||||||
DEPEND="$(ruby_implementation_depend ruby20)
|
|
||||||
dev-vcs/git
|
|
||||||
virtual/ssh
|
|
||||||
dev-db/redis"
|
|
||||||
RDEPEND="${DEPEND}"
|
|
||||||
|
|
||||||
GIT_USER="git"
|
|
||||||
GIT_GROUP="git"
|
|
||||||
HOME=$(if [ -n "$(getent passwd git | cut -d: -f6)" ]; then (getent passwd git | cut -d: -f6); else (echo /var/lib/git); fi)
|
|
||||||
REPO_DIR="${HOME}/repositories"
|
|
||||||
AUTH_FILE="${HOME}/.ssh/authorized_keys"
|
|
||||||
KEY_DIR=$(dirname "${AUTH_FILE}")
|
|
||||||
DEST_DIR="/var/lib/${PN}"
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
|
|
||||||
enewgroup ${GIT_GROUP}
|
|
||||||
enewuser ${GIT_USER} -1 -1 "${HOME}" ${GIT_GROUP}
|
|
||||||
}
|
|
||||||
|
|
||||||
all_ruby_unpack() {
|
|
||||||
git-2_src_unpack
|
|
||||||
cd ${P}
|
|
||||||
sed -i \
|
|
||||||
-e "s|\(user:\).*|\1 ${GIT_USER}|" \
|
|
||||||
-e "s|\(repos_path:\).*|\1 \"${REPO_DIR}\"|" \
|
|
||||||
-e "s|\(auth_file:\).*|\1 \"${AUTH_FILE}\"|" \
|
|
||||||
config.yml.example || die "failed to filter config.yml.example"
|
|
||||||
}
|
|
||||||
|
|
||||||
all_ruby_install() {
|
|
||||||
|
|
||||||
rm -Rf .git .gitignore
|
|
||||||
|
|
||||||
insinto ${DEST_DIR}
|
|
||||||
touch gitlab-shell.log
|
|
||||||
doins -r . || die
|
|
||||||
|
|
||||||
dosym ${DEST_DIR}/bin/gitlab-keys /usr/bin/gitlab-keys || die
|
|
||||||
dosym ${DEST_DIR}/bin/gitlab-projects /usr/bin/gitlab-projects || die
|
|
||||||
dosym ${DEST_DIR}/bin/gitlab-shell /usr/bin/gitlab-shell || die
|
|
||||||
dosym ${DEST_DIR}/bin/check /usr/bin/gitlab-check || die
|
|
||||||
|
|
||||||
fperms 0755 ${DEST_DIR}/bin/gitlab-keys || die
|
|
||||||
fperms 0755 ${DEST_DIR}/bin/gitlab-projects || die
|
|
||||||
fperms 0755 ${DEST_DIR}/bin/gitlab-shell || die
|
|
||||||
fperms 0755 ${DEST_DIR}/bin/check || die
|
|
||||||
fperms 0755 ${DEST_DIR}/bin/create-hooks || die
|
|
||||||
fperms 0755 ${DEST_DIR}/bin/install || die
|
|
||||||
|
|
||||||
fperms 0755 ${DEST_DIR}/hooks/post-receive || die
|
|
||||||
fperms 0755 ${DEST_DIR}/hooks/pre-receive || die
|
|
||||||
|
|
||||||
fowners ${GIT_USER} ${DEST_DIR}/gitlab-shell.log
|
|
||||||
fowners ${GIT_USER} ${DEST_DIR} || die
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
|
|
||||||
dodir "${REPO_DIR}" || die
|
|
||||||
|
|
||||||
if [[ ! -d "${KEY_DIR}" ]] ; then
|
|
||||||
mkdir "${KEY_DIR}" || die
|
|
||||||
chmod 0700 "${KEY_DIR}" || die
|
|
||||||
chown ${GIT_USER}:${GIT_GROUP} "${KEY_DIR}" -R || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -e "${AUTH_FILE}" ]] ; then
|
|
||||||
touch "${AUTH_FILE}" || die
|
|
||||||
chmod 0600 "${AUTH_FILE}" || die
|
|
||||||
chown ${GIT_USER}:${GIT_GROUP} "${AUTH_FILE}" || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -d "${REPO_DIR}" ]] ; then
|
|
||||||
mkdir "${REPO_DIR}"
|
|
||||||
chmod ug+rwX,o-rwx "${REPO_DIR}" -R || die
|
|
||||||
chmod ug-s,o-rwx "${REPO_DIR}" -R || die
|
|
||||||
chown ${GIT_USER}:${GIT_GROUP} "${REPO_DIR}" -R || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
elog "Copy ${DEST_DIR}/config.yml.example to ${DEST_DIR}/config.yml"
|
|
||||||
elog "and edit this file in order to configure your GitLab-Shell settings."
|
|
||||||
}
|
|
|
@ -1,3 +1,3 @@
|
||||||
AUX ultradefrag.patch 978 SHA256 ba620dee40298031abede75159cd8591985d80dde41d4fd94520380f6de5e0e7 SHA512 4946e86fd7b9c055332ccf76a968c0ca7d5f0a99b109229dd31817112747dd2d035d1f2144066726d0f4d53993148d41ddb5e38df6147523270997f08f0d80c4 WHIRLPOOL 6846c605fb831fa0388b61e916db28571daff4559f8ddfb4889bb8a30265f6f5dd91206d0e39effd0aea24c748fd86ebc8f0e1abc8d11f9a16ccf57d1194dfe6
|
AUX ultradefrag.patch 1332 SHA256 5950fd5b8b5f965461a762ff9811462a949eb21405c4e6108670b4b24d39e18c SHA512 168a841a2a57c28b76c8e0a932ccecd2162c7bf8ffea5c733f2da5dac02d49e7a9a487335e6dda52a0a9d1ec5c61fa5035402e3cd0c3b6b8438080984ec81637 WHIRLPOOL 7df6db021e787bfb7aadcec753561c86eaf3b8a75954c0c4abc1ec173aec35e0b17b0b4a4aeca9ad1f926677568bfb8702d0c19f007c5d5acec5e315598fe094
|
||||||
DIST ultradefrag-5.0.0AB.7.zip 7700269 SHA256 4d7dcb27ffc5bb913b464cd3b090c9651fe0d1e5b66363707428e3a4d099ca73 SHA512 568cdb101e7cdde72091a7ebd887d745841487761ac3386d04f348cc2ebd5ee40bad795525ec18517bf4c1e0d047ce5d37d72fabd5a4256c61de562a20cfd68a WHIRLPOOL 0cff63689c75fcc79307c6e818c6eb6d5f53cc27ab522bd65ee5759bd79feb9476d9a35d78fca571446d9871fe0fd1f378d932e3d167826b0d78e8396841a447
|
DIST ultradefrag-5.0.0AB.7.zip 7700269 SHA256 4d7dcb27ffc5bb913b464cd3b090c9651fe0d1e5b66363707428e3a4d099ca73 SHA512 568cdb101e7cdde72091a7ebd887d745841487761ac3386d04f348cc2ebd5ee40bad795525ec18517bf4c1e0d047ce5d37d72fabd5a4256c61de562a20cfd68a WHIRLPOOL 0cff63689c75fcc79307c6e818c6eb6d5f53cc27ab522bd65ee5759bd79feb9476d9a35d78fca571446d9871fe0fd1f378d932e3d167826b0d78e8396841a447
|
||||||
EBUILD ultradefrag-5.0.0-r7.ebuild 494 SHA256 d99e19469198aef4ce5f53c3f5d53b6d9e36f5e057390bf525b01a99e6ac5776 SHA512 01b197312b52ad99409176e90d36bbe76e4ed2d95ba256b41e74c153b7cea7a171699c8baae65cd3a71bcbbad93bd4adec37485bdd0e50db42e3a2979eee570a WHIRLPOOL 5061960a0cde4286bf4f9085ea2cd281e95cc75cee25d4c8e2f90d78e187856d6eedfc0fd52926f65ed2c831f5ed5fd493dd3837a2c126051f782bf97f1ed861
|
EBUILD ultradefrag-5.0.0-r7.ebuild 494 SHA256 d99e19469198aef4ce5f53c3f5d53b6d9e36f5e057390bf525b01a99e6ac5776 SHA512 01b197312b52ad99409176e90d36bbe76e4ed2d95ba256b41e74c153b7cea7a171699c8baae65cd3a71bcbbad93bd4adec37485bdd0e50db42e3a2979eee570a WHIRLPOOL 5061960a0cde4286bf4f9085ea2cd281e95cc75cee25d4c8e2f90d78e187856d6eedfc0fd52926f65ed2c831f5ed5fd493dd3837a2c126051f782bf97f1ed861
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
diff -urN ultradefrag-5.0.0AB.7.def/src/Makefile ultradefrag-5.0.0AB.7/src/Makefile
|
diff -urN ultradefrag-5.0.0AB.7.orig/src/Makefile ultradefrag-5.0.0AB.7/src/Makefile
|
||||||
--- ultradefrag-5.0.0AB.7.def/src/Makefile 2011-11-24 14:57:55.000000000 +0400
|
--- ultradefrag-5.0.0AB.7.orig/src/Makefile 2011-11-24 14:57:55.000000000 +0400
|
||||||
+++ ultradefrag-5.0.0AB.7/src/Makefile 2016-01-26 19:44:23.334197713 +0300
|
+++ ultradefrag-5.0.0AB.7/src/Makefile 2016-06-11 23:58:20.847846736 +0300
|
||||||
@@ -24,8 +24,8 @@
|
@@ -24,8 +24,8 @@
|
||||||
COPT=-DPPGC=1 -O2
|
COPT=-DPPGC=1 -O2
|
||||||
GCCOPT=-DPPGC=1 -O2
|
GCCOPT=-DPPGC=1 -O2
|
||||||
|
@ -12,9 +12,16 @@ diff -urN ultradefrag-5.0.0AB.7.def/src/Makefile ultradefrag-5.0.0AB.7/src/Makef
|
||||||
|
|
||||||
A=console.a udefrag.a zenwinx.a wincalls.a
|
A=console.a udefrag.a zenwinx.a wincalls.a
|
||||||
|
|
||||||
diff -urN ultradefrag-5.0.0AB.7.def/src/wincalls/ntfs-3g.c ultradefrag-5.0.0AB.7/src/wincalls/ntfs-3g.c
|
@@ -66,5 +66,5 @@
|
||||||
--- ultradefrag-5.0.0AB.7.def/src/wincalls/ntfs-3g.c 2011-11-26 17:56:37.000000000 +0400
|
$(LIB1)/crt1.o $(LIB1)/crti.o $(LIB2)/crtbegin.o \
|
||||||
+++ ultradefrag-5.0.0AB.7/src/wincalls/ntfs-3g.c 2016-01-26 19:31:50.436847655 +0300
|
console/console.a dll/udefrag/udefrag.a dll/zenwinx/zenwinx.a \
|
||||||
|
wincalls/wincalls.a $(NTFSLIB) \
|
||||||
|
- -lgcc -L$(LIB2) -L$(LIB1) -lc -lm -lpthread -lncurses \
|
||||||
|
+ -lgcc -L$(LIB2) -L$(LIB1) -lc -lm -lpthread -lncurses -ltinfo \
|
||||||
|
$(LIB2)/crtend.o $(LIB1)/crtn.o > udefrag.map
|
||||||
|
diff -urN ultradefrag-5.0.0AB.7.orig/src/wincalls/ntfs-3g.c ultradefrag-5.0.0AB.7/src/wincalls/ntfs-3g.c
|
||||||
|
--- ultradefrag-5.0.0AB.7.orig/src/wincalls/ntfs-3g.c 2011-11-26 17:56:37.000000000 +0400
|
||||||
|
+++ ultradefrag-5.0.0AB.7/src/wincalls/ntfs-3g.c 2016-06-11 23:56:53.402345824 +0300
|
||||||
@@ -31,6 +31,7 @@
|
@@ -31,6 +31,7 @@
|
||||||
#if LXSC | L8SC | STSC | SPGC | PPGC
|
#if LXSC | L8SC | STSC | SPGC | PPGC
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
AUX config.ssh 245 SHA256 5bf5d5a357e88b71e14a12bb28ea68d0286ed29118045aa944484b84b6fa5e4b SHA512 52dbec481cd45136e72370713ab20a41616dccb252e75b884b66e2494aaefe7795719169906dcad5030dcbe33201d021bdad1f7a99120ac40a64611290ff8759 WHIRLPOOL 9b991ad20787e0e7274136ddb8e22e1082360d580f8576feb722730b5c3f3fa22992f671f7916e191052a78d8d688d32044b39059dc7146d14c2da57fa891214
|
|
||||||
AUX gitlab.logrotate 191 SHA256 9c02c26f5faa443cd576599462c6a8206d62495ab9671098a5f0e379f216541b SHA512 2212a8e5f2d4704256d5abb92b5a1201b20f82b04610758e734d163792a60b78f482017510169666a70ed9352b171177d05237ffe87988cacb764c5ef7ba5443 WHIRLPOOL f61297015311316554e63af4822b8d274f5a2378e829e5c14bb22e642b0d83023446acff45a13aa354f127543ce1552c99488b92ed8f39d86959343c7e67bbee
|
|
||||||
AUX gitlabhq-8.3.2-fix-checks-gentoo.patch 390 SHA256 60324945dfff6d236faf7959a75089a782018b048ba1cb846b91e14109673236 SHA512 0ac979616639fdd9b9534c9e7c0ad3263f39fa10e6858a6c8cf401a3234d5ef20201fd97e2a5a39071dcf98fb7ca7a48b41d18db7689103e996baf65ae9f00ea WHIRLPOOL 98c46a4b4bafeb870425f437506b202c0c836b4df8763a3716d2cf21da73b04ffd0c31a6222317cf22e550a7676b463771038b595c1b2f9d491955dd0a82885a
|
|
||||||
AUX gitlabhq-8.3.2.init 2885 SHA256 1398163783c98b6c9451b29801b1caf20e3d07b03839c137a86aeb33738d55bf SHA512 5ebd9a2c06c50be5aec58c4382d47d1621971c44c238d23aceea2da7dfe23f71fc724d812b297cd8a0745c92fdd56b3468111db85e3a54011ac3e7ea3cdf573c WHIRLPOOL e244127c5b5f3440215c993774e570fc436deac7ed659b1bf99713c4960f74b97db92b1f3ed3f76218bc6943a172e1ad7824b9383791de1a3eca450ab1a5811b
|
|
||||||
EBUILD gitlabhq-8.3.2.ebuild 14405 SHA256 60293daf50f97e1cf50703fc67efc94ce33919234ef6218189c83be7a2cd1334 SHA512 739d344f27d3cfdfa8b87c304c6ffb823fae3a867f1af30a4c3f91ade8966cb5cf90789eca212bd0a31cdc31e6e20f7f1c806885ad7def6c2aa8325bf03aec8a WHIRLPOOL b6ca5d966b0f7e547ca8af813f708eaaf1ade00be166583dde99484011ffbeb352a4d86c28f29f79d4c27d3db33948b3a95a9fd85e9a57d4d283d08b3f65c5e6
|
|
|
@ -1,10 +0,0 @@
|
||||||
Host localhost
|
|
||||||
StrictHostKeyChecking no
|
|
||||||
UserKnownHostsFile=/dev/null
|
|
||||||
BatchMode yes
|
|
||||||
CheckHostIP no
|
|
||||||
AddressFamily inet
|
|
||||||
PreferredAuthentications publickey
|
|
||||||
ControlMaster auto
|
|
||||||
ControlPath ~/.ssh/ssh-%r-%h:%p.sock
|
|
||||||
ControlPersist 24h
|
|
|
@ -1,10 +0,0 @@
|
||||||
# Copyright 1999-2012 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: $
|
|
||||||
|
|
||||||
@LOG_DIR@/*.log {
|
|
||||||
missingok
|
|
||||||
delaycompress
|
|
||||||
compress
|
|
||||||
copytruncate
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- lib/tasks/gitlab/check.rake.orig 2015-11-13 16:46:18.044125564 +0100
|
|
||||||
+++ lib/tasks/gitlab/check.rake 2015-11-13 16:46:24.414126919 +0100
|
|
||||||
@@ -24,8 +24,6 @@
|
|
||||||
check_log_writable
|
|
||||||
check_tmp_writable
|
|
||||||
check_uploads
|
|
||||||
- check_init_script_exists
|
|
||||||
- check_init_script_up_to_date
|
|
||||||
check_projects_have_namespace
|
|
||||||
check_redis_version
|
|
||||||
check_ruby_version
|
|
|
@ -1,89 +0,0 @@
|
||||||
#!/sbin/runscript
|
|
||||||
|
|
||||||
name="GitLab"
|
|
||||||
description="GitLab 8.3 on Unicorns"
|
|
||||||
|
|
||||||
: ${gitlab_user:=git}
|
|
||||||
: ${gitlab_group:=git}
|
|
||||||
: ${gitlab_home:="/opt/gitlabhq-8.3"}
|
|
||||||
: ${gitlab_log:="/var/log/gitlabhq-8.3"}
|
|
||||||
|
|
||||||
: ${unicorn_pidfile:="${gitlab_home}/tmp/pids/unicorn.pid"}
|
|
||||||
: ${unicorn_log:="${gitlab_log}/unicorn.log"}
|
|
||||||
|
|
||||||
: ${sidekiq_pidfile:="${gitlab_home}/tmp/pids/sidekiq.pid"}
|
|
||||||
: ${sidekiq_log:="${gitlab_log}/sidekiq.log"}
|
|
||||||
|
|
||||||
: ${workhorse_pidfile:="${gitlab_home}/tmp/pids/workhorse.pid"}
|
|
||||||
: ${workhorse_log:="${gitlab_log}/workhorse.log"}
|
|
||||||
: ${workhorse_socket:="${gitlab_home}/tmp/sockets/gitlab-workhorse.socket"}
|
|
||||||
|
|
||||||
: ${rails_env:=production}
|
|
||||||
|
|
||||||
unicorn_command="/usr/bin/bundle"
|
|
||||||
unicorn_command_args="exec unicorn_rails -c ${gitlab_home}/config/unicorn.rb -E ${rails_env} -D"
|
|
||||||
sidekiq_command="/usr/bin/bundle"
|
|
||||||
sidekiq_start_command_args="exec sidekiq -c 10 -q post_receive -q mailer -q archive_repo -q system_hook -q project_web_hook -q gitlab_shell -q incoming_email -q runner -q common -q default -e ${rails_env} -d -P ${sidekiq_pidfile} -L ${sidekiq_log} $@ >> ${sidekiq_log} 2>&1"
|
|
||||||
sidekiq_stop_command_args="exec sidekiqctl stop ${sidekiq_pidfile} >> ${sidekiq_log}"
|
|
||||||
workhorse_command="/usr/bin/gitlab-workhorse"
|
|
||||||
workhorse_command_args="-listenUmask 0 -listenNetwork unix -listenAddr ${workhorse_socket} -authBackend http://127.0.0.1:8080"
|
|
||||||
|
|
||||||
if [ ${rails_env} = development ]; then
|
|
||||||
sidekiq_command_args+=" VVERBOSE=1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
provide gitlab
|
|
||||||
need redis
|
|
||||||
use net mysql postgresql
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
|
|
||||||
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${unicorn_pidfile}")"
|
|
||||||
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${sidekiq_pidfile}")"
|
|
||||||
|
|
||||||
ebegin "Starting GitLab 8.3 Unicorn servers"
|
|
||||||
start-stop-daemon --start \
|
|
||||||
--chdir "${gitlab_home}" \
|
|
||||||
--user="${gitlab_user}:${gitlab_group}" \
|
|
||||||
--pidfile="${unicorn_pidfile}" \
|
|
||||||
--exec ${unicorn_command} -- ${unicorn_command_args}
|
|
||||||
eend $?
|
|
||||||
|
|
||||||
ebegin "Starting GitLab 8.3 Sidekiq"
|
|
||||||
cd "${gitlab_home}"
|
|
||||||
sudo -u git -H ${sidekiq_command} ${sidekiq_start_command_args}
|
|
||||||
eend $?
|
|
||||||
|
|
||||||
ebegin "Starting GitLab 8.3 Workhorse"
|
|
||||||
start-stop-daemon --start \
|
|
||||||
--chdir "${gitlab_home}" \
|
|
||||||
--user="${gitlab_user}:${gitlab_group}" \
|
|
||||||
--pidfile="${workhorse_pidfile}" \
|
|
||||||
--background -1 "${workhorse_log}" -2 "${workhorse_log}" \
|
|
||||||
--exec ${workhorse_command} -- ${workhorse_command_args}
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
|
|
||||||
ebegin "Stopping GitLab 8.3 Workhorse"
|
|
||||||
start-stop-daemon --stop \
|
|
||||||
--chdir "${gitlab_home}" \
|
|
||||||
--user="${gitlab_user}:${gitlab_group}" \
|
|
||||||
--pidfile="${workhorse_pidfile}"
|
|
||||||
eend $?
|
|
||||||
|
|
||||||
ebegin "Stopping GitLab 8.3 Sidekiq"
|
|
||||||
cd "${gitlab_home}"
|
|
||||||
sudo -u git -H ${sidekiq_command} ${sidekiq_stop_command_args}
|
|
||||||
eend $?
|
|
||||||
|
|
||||||
ebegin "Stopping GitLab 8.3 Unicorn servers"
|
|
||||||
start-stop-daemon --stop \
|
|
||||||
--chdir "${gitlab_home}" \
|
|
||||||
--user="${gitlab_user}:${gitlab_group}" \
|
|
||||||
--pidfile="${unicorn_pidfile}"
|
|
||||||
eend $?
|
|
||||||
}
|
|
|
@ -1,443 +0,0 @@
|
||||||
# Copyright 1999-2015 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: $
|
|
||||||
|
|
||||||
EAPI="5"
|
|
||||||
|
|
||||||
# Mainteiner notes:
|
|
||||||
# - This ebuild uses Bundler to download and install all gems in deployment mode
|
|
||||||
# (i.e. into isolated directory inside application). That's not Gentoo way how
|
|
||||||
# it should be done, but GitLab has too many dependencies that it will be too
|
|
||||||
# difficult to maintain them via ebuilds.
|
|
||||||
|
|
||||||
USE_RUBY="ruby21"
|
|
||||||
PYTHON_DEPEND="2:2.5"
|
|
||||||
|
|
||||||
EGIT_REPO_URI="https://gitlab.com/gitlab-org/gitlab-ce.git"
|
|
||||||
EGIT_COMMIT="v${PV}"
|
|
||||||
|
|
||||||
inherit eutils git-2 python ruby-ng versionator user
|
|
||||||
|
|
||||||
DESCRIPTION="GitLab is a free project and repository management application"
|
|
||||||
HOMEPAGE="https://about.gitlab.com/gitlab-ci/"
|
|
||||||
|
|
||||||
LICENSE="MIT"
|
|
||||||
SLOT=$(get_version_component_range 1-2)
|
|
||||||
KEYWORDS="~amd64 ~x86 ~arm"
|
|
||||||
IUSE="memcached mysql +postgres +unicorn"
|
|
||||||
|
|
||||||
## Gems dependencies:
|
|
||||||
# charlock_holmes dev-libs/icu
|
|
||||||
# grape, capybara dev-libs/libxml2, dev-libs/libxslt
|
|
||||||
# json dev-util/ragel
|
|
||||||
# yajl-ruby dev-libs/yajl
|
|
||||||
# pygments.rb python 2.5+
|
|
||||||
# execjs net-libs/nodejs, or any other JS runtime
|
|
||||||
# pg dev-db/postgresql-base
|
|
||||||
# mysql virtual/mysql
|
|
||||||
# rugged net-libs/http-parser dev-libs/libgit2
|
|
||||||
#
|
|
||||||
GEMS_DEPEND="
|
|
||||||
dev-libs/icu
|
|
||||||
dev-libs/libxml2
|
|
||||||
dev-libs/libxslt
|
|
||||||
dev-util/ragel
|
|
||||||
dev-libs/yajl
|
|
||||||
net-libs/nodejs
|
|
||||||
postgres? ( dev-db/postgresql )
|
|
||||||
mysql? ( virtual/mysql )
|
|
||||||
memcached? ( net-misc/memcached )
|
|
||||||
net-libs/http-parser
|
|
||||||
>=dev-libs/libgit2-0.23.0"
|
|
||||||
DEPEND="${GEMS_DEPEND}
|
|
||||||
>=dev-lang/ruby-2.0[readline,ssl]
|
|
||||||
>dev-vcs/git-2.2.1
|
|
||||||
>=dev-vcs/gitlab-shell-2.6.9
|
|
||||||
>=www-servers/gitlab-workhorse-0.5.1
|
|
||||||
net-misc/curl
|
|
||||||
virtual/ssh"
|
|
||||||
RDEPEND="${DEPEND}
|
|
||||||
>=dev-db/redis-2.4.0
|
|
||||||
virtual/mta
|
|
||||||
virtual/krb5"
|
|
||||||
ruby_add_bdepend "
|
|
||||||
virtual/rubygems
|
|
||||||
>=dev-ruby/bundler-1.0"
|
|
||||||
|
|
||||||
RUBY_PATCHES=(
|
|
||||||
"${P}-fix-checks-gentoo.patch"
|
|
||||||
)
|
|
||||||
|
|
||||||
GIT_USER="git"
|
|
||||||
GIT_GROUP="git"
|
|
||||||
GIT_HOME=$(getent passwd $GIT_USER | cut -d: -f6)
|
|
||||||
DEST_DIR="/opt/${PN}-${SLOT}"
|
|
||||||
CONF_DIR="/etc/${PN}-${SLOT}"
|
|
||||||
|
|
||||||
GIT_REPOS="${GIT_HOME}/repositories"
|
|
||||||
GIT_SATELLITES="${GIT_HOME}/gitlab-satellites"
|
|
||||||
GITLAB_SHELL="/var/lib/gitlab-shell"
|
|
||||||
GITLAB_SHELL_HOOKS="${GITLAB_SHELL}/hooks"
|
|
||||||
|
|
||||||
RAILS_ENV=${RAILS_ENV:-production}
|
|
||||||
RUBY=${RUBY:-ruby21}
|
|
||||||
BUNDLE="${RUBY} /usr/bin/bundle"
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
enewgroup ${GIT_GROUP}
|
|
||||||
enewuser ${GIT_USER} -1 -1 ${DEST_DIR} "$GIT_GROUP}"
|
|
||||||
}
|
|
||||||
|
|
||||||
all_ruby_unpack() {
|
|
||||||
git-2_src_unpack
|
|
||||||
}
|
|
||||||
|
|
||||||
each_ruby_prepare() {
|
|
||||||
|
|
||||||
# fix path to repo and gitlab-shell hooks
|
|
||||||
test -d "${GITLAB_SHELL_HOOKS}" || die "Gitlab Shell hooks directory not found: \"${GITLAB_SHELL_HOOKS}. Have you properly installed dev-vcs/gitlab-shell"?
|
|
||||||
|
|
||||||
sed -i \
|
|
||||||
-e "s|\(\s*path:\s\)/.*/gitlab-shell/|\1 ${GITLAB_SHELL}/|" \
|
|
||||||
-e "s|\(\s*repos_path:\s\)/.*|\1 ${GIT_REPOS}/|" \
|
|
||||||
-e "s|\(\s*hooks_path:\s\)/.*|\1 ${GITLAB_SHELL_HOOKS}/|" \
|
|
||||||
-e "s|\(\s*path:\s\)/.*/gitlab-satellites/|\1 ${GIT_SATELLITES}/|" \
|
|
||||||
-e "s|\(\s*GITLAB_SHELL:\s*\)|\1\n\tpath: \"${GITLAB_SHELL}\"|" \
|
|
||||||
config/gitlab.yml.example || die "failed to filter gitlab.yml.example"
|
|
||||||
|
|
||||||
# modify database settings
|
|
||||||
sed -i \
|
|
||||||
-e 's|\(username:\) postgres.*|\1 gitlab|' \
|
|
||||||
-e 's|\(password:\).*|\1 gitlab|' \
|
|
||||||
-e 's|\(socket:\).*|/run/postgresql/.s.PGSQL.5432|' \
|
|
||||||
config/database.yml.postgresql \
|
|
||||||
|| die "failed to filter database.yml.postgresql"
|
|
||||||
|
|
||||||
# replace "secret" token with random one
|
|
||||||
local randpw=$(echo ${RANDOM}|sha512sum|cut -c 1-128)
|
|
||||||
sed -i -e "/secret_token =/ s/=.*/= '${randpw}'/" \
|
|
||||||
config/initializers/secret_token.rb \
|
|
||||||
|| die "failed to filter secret_token.rb"
|
|
||||||
|
|
||||||
# remove needless files
|
|
||||||
rm .foreman .gitignore Procfile
|
|
||||||
use unicorn || rm config/unicorn.rb.example
|
|
||||||
use postgres || rm config/database.yml.postgresql
|
|
||||||
use mysql || rm config/database.yml.mysql
|
|
||||||
|
|
||||||
# change cache_store
|
|
||||||
if use memcached; then
|
|
||||||
sed -i \
|
|
||||||
-e "/\w*config.cache_store / s/=.*/= :dalli_store, { namespace: 'gitlab' }/" \
|
|
||||||
config/environments/production.rb \
|
|
||||||
|| die "failed to modify production.rb"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update pathes for unicorn
|
|
||||||
if use unicorn; then
|
|
||||||
sed -i \
|
|
||||||
-e "s#/home/git/gitlab#${DEST_DIR}#" \
|
|
||||||
config/unicorn.rb.example \
|
|
||||||
|| die "failed to modify unicorn.rb.example"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
each_ruby_install() {
|
|
||||||
local dest="${DEST_DIR}"
|
|
||||||
local conf="/etc/${PN}-${SLOT}"
|
|
||||||
local temp="/var/tmp/${PN}-${SLOT}"
|
|
||||||
local logs="/var/log/${PN}-${SLOT}"
|
|
||||||
local uploads="${DEST_DIR}/public/uploads"
|
|
||||||
|
|
||||||
## Prepare directories ##
|
|
||||||
|
|
||||||
diropts -m750
|
|
||||||
keepdir "${logs}"
|
|
||||||
dodir "${temp}"
|
|
||||||
|
|
||||||
diropts -m755
|
|
||||||
keepdir "${conf}"
|
|
||||||
dodir "${dest}"
|
|
||||||
dodir "${uploads}"
|
|
||||||
|
|
||||||
dosym "${temp}" "${dest}/tmp"
|
|
||||||
dosym "${logs}" "${dest}/log"
|
|
||||||
|
|
||||||
## Link gitlab-shell into git home
|
|
||||||
dosym "${GITLAB_SHELL}" "${GIT_HOME}/gitlab-shell"
|
|
||||||
|
|
||||||
## Install configs ##
|
|
||||||
|
|
||||||
insinto "${conf}"
|
|
||||||
doins -r config/*
|
|
||||||
dosym "${conf}" "${dest}/config"
|
|
||||||
|
|
||||||
insinto "${dest}/.ssh"
|
|
||||||
newins "${FILESDIR}/config.ssh" config
|
|
||||||
|
|
||||||
echo "export RAILS_ENV=production" > "${D}/${dest}/.profile"
|
|
||||||
|
|
||||||
## Install all others ##
|
|
||||||
|
|
||||||
# remove needless dirs
|
|
||||||
rm -Rf config tmp log
|
|
||||||
|
|
||||||
insinto "${dest}"
|
|
||||||
doins -r ./
|
|
||||||
|
|
||||||
## Install logrotate config ##
|
|
||||||
|
|
||||||
dodir /etc/logrotate.d
|
|
||||||
sed -e "s|@LOG_DIR@|${logs}|" \
|
|
||||||
"${FILESDIR}"/gitlab.logrotate > "${D}"/etc/logrotate.d/${PN}-${SLOT} \
|
|
||||||
|| die "failed to filter gitlab.logrotate"
|
|
||||||
|
|
||||||
## Install gems via bundler ##
|
|
||||||
|
|
||||||
cd "${D}/${dest}"
|
|
||||||
|
|
||||||
local without="development test thin"
|
|
||||||
local flag; for flag in memcached mysql postgres unicorn; do
|
|
||||||
without+="$(use $flag || echo ' '$flag)"
|
|
||||||
done
|
|
||||||
local bundle_args="--deployment ${without:+--without ${without}}"
|
|
||||||
|
|
||||||
# Use systemlibs for rugged
|
|
||||||
${BUNDLE} config build.rugged --use-system-libraries
|
|
||||||
|
|
||||||
# Use systemlibs for nokogiri as suggested
|
|
||||||
${BUNDLE} config build.nokogiri --use-system-libraries
|
|
||||||
|
|
||||||
# Fix invalid ldflags for charlock_holmes,
|
|
||||||
# see https://github.com/brianmario/charlock_holmes/issues/32
|
|
||||||
${BUNDLE} config build.charlock_holmes --with-ldflags='-L. -Wl,-O1 -Wl,--as-needed -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -lz -licuuc'
|
|
||||||
|
|
||||||
einfo "Running bundle install ${bundle_args} ..."
|
|
||||||
${BUNDLE} install ${bundle_args} || die "bundler failed"
|
|
||||||
|
|
||||||
## Clean ##
|
|
||||||
|
|
||||||
local gemsdir=vendor/bundle/ruby/$(ruby_rbconfig_value 'ruby_version')
|
|
||||||
|
|
||||||
# remove gems cache
|
|
||||||
rm -Rf ${gemsdir}/cache
|
|
||||||
|
|
||||||
# fix permissions
|
|
||||||
fowners -R ${GIT_USER}:${GIT_GROUP} "${dest}" "${conf}" "${temp}" "${logs}"
|
|
||||||
fperms o+Xr "${temp}" # Let nginx access the unicorn socket
|
|
||||||
|
|
||||||
## RC scripts ##
|
|
||||||
local rcscript=${P}.init
|
|
||||||
|
|
||||||
cp "${FILESDIR}/${rcscript}" "${T}" || die
|
|
||||||
sed -i \
|
|
||||||
-e "s|@GIT_USER@|${GIT_USER}|" \
|
|
||||||
-e "s|@GIT_GROUP@|${GIT_USER}|" \
|
|
||||||
-e "s|@SLOT@|${SLOT}|" \
|
|
||||||
-e "s|@DEST_DIR@|${dest}|" \
|
|
||||||
-e "s|@LOG_DIR@|${logs}|" \
|
|
||||||
-e "s|@RESQUE_QUEUE@|${resque_queue}|" \
|
|
||||||
"${T}/${rcscript}" \
|
|
||||||
|| die "failed to filter ${rcscript}"
|
|
||||||
|
|
||||||
if use memcached; then
|
|
||||||
sed -i -e '/^depend/,// {/need / s/$/ memcached/}' \
|
|
||||||
"${T}/${rcscript}" || die "failed to filter ${rcscript}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
newinitd "${T}/${rcscript}" "${PN}-${SLOT}"
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_preinst() {
|
|
||||||
diropts -m "0750" -o "${GIT_USER}" -g "${GIT_GROUP}"
|
|
||||||
dodir "${GIT_SATELLITES}"
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
if [ ! -e "${GIT_HOME}/.ssh/id_rsa" ]; then
|
|
||||||
einfo "Generating SSH key for git user"
|
|
||||||
su -l ${GIT_USER} -s /bin/sh -c "
|
|
||||||
ssh-keygen -q -N '' -t rsa -f ${GIT_HOME}/.ssh/id_rsa" \
|
|
||||||
|| die "failed to generate SSH key"
|
|
||||||
fi
|
|
||||||
if [ ! -e "${GIT_HOME}/.gitconfig" ]; then
|
|
||||||
einfo "Setting git user in ${GIT_HOME}/.gitconfig, feel free to "
|
|
||||||
einfo "modify this file according to your needs!"
|
|
||||||
su -l ${GIT_USER} -s /bin/sh -c "
|
|
||||||
git config --global core.autocrlf 'input';
|
|
||||||
git config --global user.email 'gitlab@localhost';
|
|
||||||
git config --global user.name 'GitLab'" \
|
|
||||||
|| die "failed to setup git name and email"
|
|
||||||
fi
|
|
||||||
|
|
||||||
elog "If this is a new installation, proceed with the following steps:"
|
|
||||||
elog
|
|
||||||
elog " 1. Copy ${CONF_DIR}/gitlab.yml.example to ${CONF_DIR}/gitlab.yml"
|
|
||||||
elog " and edit this file in order to configure your GitLab settings."
|
|
||||||
elog
|
|
||||||
elog " 2. Copy ${CONF_DIR}/database.yml.* to ${CONF_DIR}/database.yml"
|
|
||||||
elog " and edit this file in order to configure your database settings"
|
|
||||||
elog " for \"production\" environment."
|
|
||||||
elog
|
|
||||||
elog " 3. Copy ${CONF_DIR}/initializers/rack_attack.rb.example"
|
|
||||||
elog " to ${CONF_DIR}/initializers/rack_attack.rb"
|
|
||||||
elog
|
|
||||||
elog " 4. Copy ${CONF_DIR}/resque.yml.example to ${CONF_DIR}/resque.yml"
|
|
||||||
elog " and edit this file in order to configure your Redis settings"
|
|
||||||
elog " for \"production\" environment."
|
|
||||||
elog
|
|
||||||
|
|
||||||
if use unicorn; then
|
|
||||||
elog " 4a. Copy ${CONF_DIR}/unicorn.rb.example to ${CONF_DIR}/unicorn.rb"
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
|
|
||||||
elog " 5. If this is a new installation, create a database for your GitLab instance."
|
|
||||||
if use postgres; then
|
|
||||||
elog " If you have local PostgreSQL running, just copy&run:"
|
|
||||||
elog " su postgres"
|
|
||||||
elog " psql -c \"CREATE ROLE gitlab PASSWORD 'gitlab' \\"
|
|
||||||
elog " NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\""
|
|
||||||
elog " createdb -E UTF-8 -O gitlab gitlab_production"
|
|
||||||
elog " Note: You should change your password to something more random..."
|
|
||||||
elog
|
|
||||||
elog " GitLab uses polymorphic associations which are not SQL-standard friendly."
|
|
||||||
elog " To get it work you must use this ugly workaround:"
|
|
||||||
elog " psql -U postgres -d gitlab"
|
|
||||||
elog " CREATE CAST (integer AS text) WITH INOUT AS IMPLICIT;"
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
elog " 6. Execute the following command to finalize your setup:"
|
|
||||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
|
||||||
elog " Note: Do not forget to start Redis server."
|
|
||||||
elog
|
|
||||||
elog "To update an existing instance, run the following command and choose upgrading when prompted:"
|
|
||||||
elog " emerge --config \"=${CATEGORY}/${PF}\""
|
|
||||||
elog
|
|
||||||
elog "Important: Do not remove the earlier version prior migration!"
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_config() {
|
|
||||||
|
|
||||||
# Ask user whether this is the first installation
|
|
||||||
einfo "Do you want to upgrade an existing installation? [Y|n] "
|
|
||||||
do_upgrade=""
|
|
||||||
while true
|
|
||||||
do
|
|
||||||
read -r do_upgrade
|
|
||||||
if [[ $do_upgrade == "n" || $do_upgrade == "N" ]] ; then do_upgrade="" && break
|
|
||||||
elif [[ $do_upgrade == "y" || $do_upgrade == "Y" || $do_upgrade == "" ]] ; then do_upgrade=1 && break
|
|
||||||
else eerrorn "Please type either \"Y\" or \"N\" ... " ; fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $do_upgrade ]] ; then
|
|
||||||
|
|
||||||
LATEST_DEST=$(test -n "${LATEST_DEST}" && echo ${LATEST_DEST} || \
|
|
||||||
find /opt -maxdepth 1 -iname 'gitlabhq-*' -and -type d -and -not -iname "gitlabhq-${SLOT}" | \
|
|
||||||
sort -r | head -n1)
|
|
||||||
|
|
||||||
if [[ -z "${LATEST_DEST}" || ! -d "${LATEST_DEST}" ]] ; then
|
|
||||||
einfo "Please enter the path to your latest Gitlab instance:"
|
|
||||||
while true
|
|
||||||
do
|
|
||||||
read -r LATEST_DEST
|
|
||||||
test -d ${LATEST_DEST} && break ||\
|
|
||||||
eerror "Please specify a valid path to your Gitlab instance!"
|
|
||||||
done
|
|
||||||
else
|
|
||||||
einfo "Found your latest Gitlab instance at \"${LATEST_DEST}\"."
|
|
||||||
fi
|
|
||||||
|
|
||||||
einfo "Please make sure that you've stopped your running Gitlab instance and that you've created a backup: "
|
|
||||||
elog "\$ cd \"${LATEST_DEST}\" && sudo -u ${GIT_USER} ${BUNDLE} exec rake gitlab:backup:create RAILS_ENV=production"
|
|
||||||
elog "\$ /etc/init.d/${LATEST_DEST#*/opt/} stop"
|
|
||||||
elog ""
|
|
||||||
|
|
||||||
einfo "Press ENTER to continue, STRG-C to cancel"
|
|
||||||
read
|
|
||||||
|
|
||||||
einfo "Migrating uploads ..."
|
|
||||||
einfo "This will move your uploads from \"$LATEST_DEST\" to \"${DEST_DIR}\", continue? [Y|n] "
|
|
||||||
migrate_uploads=""
|
|
||||||
while true
|
|
||||||
do
|
|
||||||
read -r migrate_uploads
|
|
||||||
if [[ $migrate_uploads == "n" || $migrate_uploads == "N" ]] ; then migrate_uploads="" && break
|
|
||||||
elif [[ $migrate_uploads == "y" || $migrate_uploads == "Y" || $migrate_uploads == "" ]] ; then migrate_uploads=1 && break
|
|
||||||
else eerror "Please type either \"Y\" or \"N\" ... " ; fi
|
|
||||||
done
|
|
||||||
if [[ $migrate_uploads ]] ; then
|
|
||||||
su -l ${GIT_USER} -s /bin/sh -c "
|
|
||||||
mv ${LATEST_DEST}/public/uploads/* ${DEST_DIR}/public/uploads/" \
|
|
||||||
|| die "failed to migrate uplaods."
|
|
||||||
fi
|
|
||||||
|
|
||||||
einfo "Migrating config ..."
|
|
||||||
for conf in database.yml gitlab.yml resque.yml unicorn.rb ; do
|
|
||||||
cp "${LATEST_DEST}/config/${conf}" "${DEST_DIR}/config/"
|
|
||||||
|
|
||||||
example="${DEST_DIR}/config/${conf}.example"
|
|
||||||
test -f "${example}" && mv "${example}" "${DEST_DIR}/config/.cfg0000_${conf}"
|
|
||||||
done
|
|
||||||
CONFIG_PROTECT="${DEST_DIR}" dispatch-conf || die "failed to automatically migrate config, run \"CONFIG_PROTECT=${DEST_DIR} dispatch-conf\" by hand, re-run this routine and skip config migration to proceed."
|
|
||||||
|
|
||||||
einfo "Migrating database ..."
|
|
||||||
su -l ${GIT_USER} -s /bin/sh -c "
|
|
||||||
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
|
|
||||||
cd ${DEST_DIR}
|
|
||||||
${BUNDLE} exec rake db:migrate RAILS_ENV=production" \
|
|
||||||
|| die "failed to migrate database."
|
|
||||||
|
|
||||||
einfo "Clear redis cache ..."
|
|
||||||
su -l ${GIT_USER} -s /bin/sh -c "
|
|
||||||
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
|
|
||||||
cd ${DEST_DIR}
|
|
||||||
${BUNDLE} exec rake cache:clear RAILS_ENV=production" \
|
|
||||||
|| die "failed to run cache:clear"
|
|
||||||
|
|
||||||
einfo "Clear and precompile assets ..."
|
|
||||||
su -l ${GIT_USER} -s /bin/sh -c "
|
|
||||||
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
|
|
||||||
cd ${DEST_DIR}
|
|
||||||
${BUNDLE} exec rake assets:clean RAILS_ENV=production
|
|
||||||
${BUNDLE} exec rake assets:precompile RAILS_ENV=production" \
|
|
||||||
|| die "failed to run assets:clean and assets:precompile"
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
## Check config files existence ##
|
|
||||||
einfo "Checking configuration files ..."
|
|
||||||
|
|
||||||
if [ ! -r "${CONF_DIR}/database.yml" ] ; then
|
|
||||||
eerror "Copy \"${CONF_DIR}/database.yml.*\" to \"${CONF_DIR}/database.yml\""
|
|
||||||
eerror "and edit this file in order to configure your database settings for"
|
|
||||||
eerror "\"production\" environment."
|
|
||||||
die
|
|
||||||
fi
|
|
||||||
if [ ! -r "${CONF_DIR}/gitlab.yml" ]; then
|
|
||||||
eerror "Copy \"${CONF_DIR}/gitlab.yml.example\" to \"${CONF_DIR}/gitlab.yml\""
|
|
||||||
eerror "and edit this file in order to configure your GitLab settings"
|
|
||||||
eerror "for \"production\" environment."
|
|
||||||
die
|
|
||||||
fi
|
|
||||||
|
|
||||||
einfo "Initializing database ..."
|
|
||||||
su -l ${GIT_USER} -s /bin/sh -c "
|
|
||||||
export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8
|
|
||||||
cd ${DEST_DIR}
|
|
||||||
${BUNDLE} exec rake gitlab:setup RAILS_ENV=${RAILS_ENV}" \
|
|
||||||
|| die "failed to run rake gitlab:setup"
|
|
||||||
fi
|
|
||||||
|
|
||||||
## (Re-)Link gitlab-shell-secret into gitlab-shell
|
|
||||||
if test -L "${GITLAB_SHELL}/.gitlab_shell_secret"
|
|
||||||
then
|
|
||||||
rm "${GITLAB_SHELL}/.gitlab_shell_secret"
|
|
||||||
ln -s "${DEST_DIR}/.gitlab_shell_secret" "${GITLAB_SHELL}/.gitlab_shell_secret"
|
|
||||||
fi
|
|
||||||
|
|
||||||
einfo "You might want to run the following in order to check your application status:"
|
|
||||||
einfo "# cd ${DEST_DIR} && sudo -u ${GIT_USER} ${BUNDLE} exec rake gitlab:check RAILS_ENV=production"
|
|
||||||
einfo ""
|
|
||||||
einfo "GitLab is prepared, now you should configure your web server."
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
EBUILD gitlab-workhorse-0.5.1.ebuild 506 SHA256 da9f951a048f4d857d82b85805e93cd844a7e8bb6ffe812f7192d0aa9ba572ab SHA512 e2d66c52e1ba17e53ab0c61b29d8decb72296c3e21b73d0e35e60c6c6d529fa06b53d291cc8343892ba5d3266b8bc8719fccb05547ced53dcb4c8eb05b096a3e WHIRLPOOL fed8021464d8f6a039b4fccbc530db00ac80b3db03c146f584361f515bc1a8b8786071e8049283982aff8604ce6168d0d882858f8e984133fe53e72bce24f5dd
|
|
|
@ -1,25 +0,0 @@
|
||||||
# Copyright 1999-2015 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: $
|
|
||||||
|
|
||||||
EAPI="5"
|
|
||||||
|
|
||||||
EGIT_REPO_URI="https://gitlab.com/gitlab-org/gitlab-workhorse.git"
|
|
||||||
EGIT_COMMIT="${PV}"
|
|
||||||
|
|
||||||
inherit eutils git-2 user
|
|
||||||
|
|
||||||
DESCRIPTION="Handles slow HTTP requests for GitLab"
|
|
||||||
HOMEPAGE="https://about.gitlab.com/gitlab-ci/"
|
|
||||||
LICENSE="MIT"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~x86 ~arm"
|
|
||||||
|
|
||||||
DEPEND=">=dev-lang/go-1.5.1"
|
|
||||||
RDEPEND="${DEPEND}"
|
|
||||||
|
|
||||||
src_install()
|
|
||||||
{
|
|
||||||
into "/usr"
|
|
||||||
dobin "gitlab-workhorse"
|
|
||||||
}
|
|
Loading…
Reference in New Issue