Gentoo Archives: gentoo-commits

From: "Amadeusz Piotr Żołnowski" <aidecoe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-backup/burp/, app-backup/burp/files/
Date: Sat, 02 Jul 2016 16:12:58
Message-Id: 1467475916.4b23af00c3b7d9dd6b2099541fe01561edb25262.aidecoe@gentoo
1 commit: 4b23af00c3b7d9dd6b2099541fe01561edb25262
2 Author: Amadeusz Żołnowski <aidecoe <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 30 22:54:13 2016 +0000
4 Commit: Amadeusz Piotr Żołnowski <aidecoe <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 2 16:11:56 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b23af00
7
8 app-backup/burp: Move scripts out of /etc
9
10 Burp needs /etc/burp directory to be writable for its daemon (at least
11 first time it runs). On the other hand an executable cannot be placed
12 into a group-writable directory and this is where Burp scripts are
13 installed by default. Move all scripts to /usr/share/burp/scripts. /etc
14 is not a good place for scripts anyway.
15
16 Gentoo-Bug: 562470
17
18 Package-Manager: portage-2.3.0
19
20 app-backup/burp/burp-1.4.40-r2.ebuild | 108 ++++++++++++++++++++++++++++++++++
21 app-backup/burp/files/burp.initd | 7 ++-
22 2 files changed, 112 insertions(+), 3 deletions(-)
23
24 diff --git a/app-backup/burp/burp-1.4.40-r2.ebuild b/app-backup/burp/burp-1.4.40-r2.ebuild
25 new file mode 100644
26 index 0000000..da09df4
27 --- /dev/null
28 +++ b/app-backup/burp/burp-1.4.40-r2.ebuild
29 @@ -0,0 +1,108 @@
30 +# Copyright 1999-2016 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Id$
33 +
34 +EAPI=5
35 +
36 +inherit autotools eutils user
37 +
38 +DESCRIPTION="Network backup and restore client and server for Unix and Windows"
39 +HOMEPAGE="http://burp.grke.org/"
40 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
41 + http://burp.grke.org/downloads/${P}/${P}.tar.bz2"
42 +
43 +LICENSE="AGPL-3"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~x86"
46 +IUSE="acl afs ipv6 libressl nls tcpd xattr"
47 +
48 +DEPEND="
49 + !libressl? ( dev-libs/openssl:0= )
50 + libressl? ( dev-libs/libressl:0= )
51 + dev-libs/uthash
52 + sys-libs/libcap
53 + <net-libs/librsync-2.0
54 + sys-libs/ncurses:0=
55 + sys-libs/zlib
56 + acl? ( sys-apps/acl )
57 + afs? ( net-fs/openafs )
58 + nls? ( sys-devel/gettext )
59 + tcpd? ( sys-apps/tcp-wrappers )
60 + xattr? ( sys-apps/attr )
61 + "
62 +RDEPEND="${DEPEND}
63 + virtual/logger
64 + "
65 +
66 +DOCS=( CONTRIBUTORS DONATIONS UPGRADING )
67 +PATCHES=(
68 + "${FILESDIR}/${PV}-non-zero-or-build-failure.patch"
69 + "${FILESDIR}/${PV}-bedup-conf-path.patch"
70 + "${FILESDIR}/${PV}-tinfo.patch"
71 + )
72 +
73 +pkg_setup() {
74 + enewgroup "${PN}"
75 + enewuser "${PN}" -1 "" "" "${PN}"
76 +}
77 +
78 +src_prepare() {
79 + epatch "${PATCHES[@]}"
80 + eautoreconf
81 +}
82 +
83 +src_configure() {
84 + local myeconfargs=(
85 + --sbindir=/usr/sbin
86 + --sysconfdir=/etc/burp
87 + --enable-largefile
88 + $(use_enable acl)
89 + $(use_enable afs)
90 + $(use_enable ipv6)
91 + $(use_enable nls)
92 + $(use_enable xattr)
93 + $(use_with tcpd tcp-wrappers)
94 + )
95 + econf "${myeconfargs[@]}"
96 +}
97 +
98 +src_install() {
99 + default
100 +
101 + fowners root:burp /etc/burp /var/spool/burp
102 + fperms 0775 /etc/burp /var/spool/burp
103 + fowners root:burp /etc/burp/clientconfdir
104 + fperms 0750 /etc/burp/clientconfdir
105 + fowners root:burp /etc/burp/burp-server.conf
106 + fperms 0640 /etc/burp/burp-server.conf
107 +
108 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
109 + dodoc docs/*
110 +
111 + local scripts_dir=/usr/share/burp/scripts
112 + dodir "${scripts_dir}"
113 + local script
114 + for script in notify_script ssl_extra_checks_script summary_script \
115 + timer_script; do
116 + mv "${D}etc/burp/${script}" "${D}${scripts_dir}/"
117 + sed -r \
118 + -e "s|(=\\s*)/etc/burp/${script}\\s*$|\1${scripts_dir}/${script}|" \
119 + -i "${D}etc/burp/burp-server.conf"
120 + done
121 +
122 + sed -e 's|^# user=graham|user = burp|' \
123 + -e 's|^# group=nogroup|group = burp|' \
124 + -e 's|^pidfile = .*|lockfile = /run/lock/burp/server.lock|' \
125 + -i "${D}etc/burp/burp-server.conf" || die
126 +}
127 +
128 +pkg_postinst() {
129 + if [[ ! -e /etc/burp/CA/index.txt ]]; then
130 + elog "At first run burp server will generate DH parameters and SSL"
131 + elog "certificates. You should adjust configuration before."
132 + elog "Server configuration is located at"
133 + elog ""
134 + elog " /etc/burp/burp-server.conf"
135 + elog ""
136 + fi
137 +}
138
139 diff --git a/app-backup/burp/files/burp.initd b/app-backup/burp/files/burp.initd
140 index 2820199..fda1a75 100644
141 --- a/app-backup/burp/files/burp.initd
142 +++ b/app-backup/burp/files/burp.initd
143 @@ -1,5 +1,5 @@
144 #!/sbin/openrc-run
145 -# Copyright 1999-2015 Gentoo Foundation
146 +# Copyright 1999-2016 Gentoo Foundation
147 # Distributed under the terms of the GNU General Public License v2
148 # $Id$
149
150 @@ -24,10 +24,11 @@ depend() {
151 }
152
153 start_pre() {
154 - checkpath -o burp:burp -m 0775 -d /run/lock/burp
155 checkpath -o root:burp -m 0775 -d /etc/burp
156 - checkpath -o root:burp -m 0750 -d /etc/burp/clientconfdir
157 checkpath -o root:burp -m 0640 -f /etc/burp/burp-server.conf
158 + checkpath -o root:burp -m 0750 -d /etc/burp/clientconfdir
159 + checkpath -o burp:burp -m 0775 -d /run/lock/burp
160 + checkpath -o root:burp -m 0750 -d /var/spool/burp
161 }
162
163 reload() {