Сравнение backuppc-3.3.1-r6 с backuppc-4.4.0-r1

/usr/portage/app-backup/backuppc/backuppc-4.4.0-r1.ebuild 2024-07-02 13:51:43.369851442 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2024 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=7
5 5

  
6 6
MY_P="BackupPC-${PV}"
7
MY_PN="BackupPC"
7 8

  
8 9
inherit depend.apache systemd
9 10

  
......
41 42
	dev-perl/CGI
42 43
	dev-perl/File-RsyncP
43 44
	dev-perl/libwww-perl
45
	dev-perl/BackupPC-XS
46
	net-misc/rsync-bpc
44 47
	virtual/mta
45 48
	virtual/perl-IO-Compress
46 49
	www-apache/mod_perl
......
48 51
	|| (
49 52
		>=www-servers/apache-2.4[${APACHE_MODULES},apache2_modules_cgi]
50 53
		>=www-servers/apache-2.4[${APACHE_MODULES},apache2_modules_cgid]
51
		>=www-servers/apache-2.4[${APACHE_MODULES},apache2_modules_fcgid]
52 54
	)
53 55
	rss? ( dev-perl/XML-RSS )
54 56
	samba? ( net-fs/samba )"
55 57

  
56
PATCHES=(
57
	"${FILESDIR}/3.3.0/01-fix-configure.pl.patch"
58
	"${FILESDIR}/3.3.0/02-fix-config.pl-formatting.patch"
59
	"${FILESDIR}/3.3.0/03-reasonable-config.pl-defaults.patch"
60
	"${FILESDIR}/3.2.0/04-add-docdir-marker.patch"
61
	"${FILESDIR}/3.2.0/05-nicelevel.patch"
62
	"${FILESDIR}"/${P}-perl522.patch #580254
63
	"${FILESDIR}"/${P}-perl526.patch #594128
64
)
65

  
66
CGIDIR="/usr/lib/backuppc/htdocs"
67
CONFDIR="/etc/BackupPC"
68
DATADIR="/var/lib/backuppc"
69
DOCDIR="/usr/share/doc/${PF}"
70
LOGDIR="/var/log/BackupPC"
58
CGIDIR="${EROOT}/usr/lib/backuppc/htdocs"
59
CONFDIR="${EROOT}/etc/${MY_PN}"
60
DATADIR="${EROOT}/var/lib/backuppc"
61
DOCDIR="${EROOT}/usr/share/doc/${PF}"
62
LOGDIR="${EROOT}/var/log/BackupPC"
71 63
need_apache2_4
72 64

  
73 65
src_prepare() {
74 66
	default
75

  
76
	# Fix initscript
77
	sed -e 's/runscript/openrc-run/g' -i init.d/src/gentoo-backuppc || die
78

  
79 67
	# Fix docs location using the marker that we've patched in.
80
	sed "s+__DOCDIR__+${DOCDIR}+" -i "lib/BackupPC/CGI/View.pm" || die
68
	sed "s+__DOCDIR__+${DOCDIR}+" -i lib/BackupPC/CGI/View.pm || die
81 69
}
82 70

  
83 71
src_install() {
84 72
	local myconf
85
	myconf=""
86 73
	if use samba ; then
87
		myconf="--bin-path smbclient=$(type -p smbclient)"
88
		myconf="${myconf} --bin-path nmblookup=$(type -p nmblookup)"
74
		myconf=(
75
			--bin-path smbclient=$(type -p smbclient)
76
			--bin-path nmblookup=$(type -p nmblookup)
77
		)
89 78
	fi
90 79

  
91 80
	/usr/bin/env perl ./configure.pl \
......
110 99
		--html-dir-url /image \
111 100
		--cgi-dir "${CGIDIR}" \
112 101
		--fhs \
113
		${myconf} || die "failed the configure.pl script"
102
		${myconf[@]} || die "failed the configure.pl script"
114 103

  
115 104
	ebegin "Installing documentation"
116 105

  
......
124 113
	doman backuppc.8
125 114

  
126 115
	# Place the documentation in the correct location
127
	dodoc "${D}/usr/doc/BackupPC.html"
128
	dodoc "${D}/usr/doc/BackupPC.pod"
129
	rm -rf "${D}/usr/doc" || die
116
	dodoc "${ED}/usr/share/doc/BackupPC/BackupPC.html"
117
	dodoc "${ED}/usr/share/doc/BackupPC/BackupPC.pod"
118
	rm -rf "${ED}/usr/share/doc" || die
130 119

  
131 120
	eend 0
132 121

  
......
139 128
	keepdir "${LOGDIR}"
140 129

  
141 130
	ebegin "Setting up init.d/conf.d/systemd scripts"
142
	newinitd "${S}"/init.d/gentoo-backuppc backuppc
143
	newconfd "${S}"/init.d/gentoo-backuppc.conf backuppc
131
	newinitd "${S}"/systemd/init.d/gentoo-backuppc backuppc
132
	newconfd "${S}"/systemd/init.d/gentoo-backuppc.conf backuppc
144 133
	systemd_dounit "${FILESDIR}/${PN}.service"
145 134

  
146 135
	insinto "${APACHE_MODULES_CONFDIR}"
......
150 139
	chown -R backuppc:backuppc "${D}${CONFDIR}" || die
151 140
	chown -R backuppc:backuppc "${D}${DATADIR}" || die
152 141
	chown -R backuppc:backuppc "${D}${LOGDIR}"  || die
142

  
143
	eend 0
153 144
}
154 145

  
155 146
pkg_postinst() {
147
	ewarn "WARNING: The --one-file-system option was added to RsyncArgs."
148
	ewarn "If you update from a prior version keep in mind that"
149
	ewarn "this prevents data of mounted partitions from being updated."
150
	ewarn
156 151
	elog "Installation finished, you may now start using BackupPC."
157 152
	elog
158
	elog "- Read the documentation in /usr/share/doc/${PF}/BackupPC.html"
153
	elog "- Read the documentation in ${EROOT}/usr/share/doc/${PF}/BackupPC.html"
159 154
	elog "  Please pay special attention to the security section."
160 155
	elog
161 156
	elog "- You can launch backuppc by running:"
162 157
	elog
163 158
	elog "    # /etc/init.d/backuppc start"
164 159
	elog
165
	elog "- To enable the GUI, first edit ${ROOT}/etc/conf.d/apache2 and add,"
160
	elog "- To enable the GUI, first edit ${EROOT}/etc/conf.d/apache2 and add,"
166 161
	elog
167 162
	elog "    \"-D BACKUPPC -D PERL -D MPM_ITK\""
168 163
	elog
169 164
	elog "  to the APACHE2_OPTS line."
170 165
	elog
171
	elog "  Then you must edit ${ROOT}/etc/apache2/modules.d/00_mpm_itk.conf"
166
	elog "  Then you must edit ${EROOT}/etc/apache2/modules.d/00_mpm_itk.conf"
172 167
	elog "  and adjust the values of LimitUIDRange/LimitGIDRange to include"
173 168
	elog "  the UID and GID of the backuppc user."
174 169
	elog
......
184 179
	# Generate a new password if there's no auth file
185 180
	if [[ ! -f "${CONFDIR}/users.htpasswd" ]]; then
186 181
		adminuser="backuppc"
187
		adminpass=$( makepasswd --chars=12 )
188
		htpasswd -bc "${CONFDIR}/users.htpasswd" $adminuser $adminpass
182
		adminpass=$(makepasswd --chars=12)
183
		htpasswd -bc "${CONFDIR}/users.htpasswd" ${adminuser} ${adminpass}
189 184

  
190 185
		elog ""
191
		elog "- Created admin user $adminuser with password $adminpass"
186
		elog "- Created admin user ${adminuser} with password ${adminpass}"
192 187
		elog "  To add new users, run: "
193 188
		elog ""
194 189
		elog "  # htpasswd ${CONFDIR}/users.htpasswd newUser"
Спасибо!