Gentoo Archives: gentoo-commits

From: Conrad Kostecki <conikost@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-block/partimage/, sys-block/partimage/files/
Date: Wed, 18 May 2022 21:02:21
Message-Id: 1652907616.e4e2ea5bf48e74ec74463b9fc6038fda7807e242.conikost@gentoo
1 commit: e4e2ea5bf48e74ec74463b9fc6038fda7807e242
2 Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 18 21:00:16 2022 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Wed May 18 21:00:16 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4e2ea5b
7
8 sys-block/partimage: drop 0.6.9-r2
9
10 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
11
12 .../files/partimage-0.6.9-zlib-1.2.5.2.patch | 33 -----
13 sys-block/partimage/partimage-0.6.9-r2.ebuild | 144 ---------------------
14 2 files changed, 177 deletions(-)
15
16 diff --git a/sys-block/partimage/files/partimage-0.6.9-zlib-1.2.5.2.patch b/sys-block/partimage/files/partimage-0.6.9-zlib-1.2.5.2.patch
17 deleted file mode 100644
18 index 57f87a5d5225..000000000000
19 --- a/sys-block/partimage/files/partimage-0.6.9-zlib-1.2.5.2.patch
20 +++ /dev/null
21 @@ -1,33 +0,0 @@
22 -http://bugs.gentoo.org/405323
23 -
24 ---- src/client/imagefile.cpp
25 -+++ src/client/imagefile.cpp
26 -@@ -783,7 +783,7 @@
27 - else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression
28 - {
29 - showDebug(1, "open gzip\n");
30 -- m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "wb"); //"wb1h");
31 -+ m_gzImageFile = gzdopen(m_nFdImage, "wb"); //"wb1h");
32 - if (m_gzImageFile == NULL)
33 - {
34 - showDebug(1, "error:%d %s\n", errno, strerror(errno));
35 -@@ -1098,7 +1098,7 @@
36 - }
37 - else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression
38 - {
39 -- m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "rb");
40 -+ m_gzImageFile = gzdopen(m_nFdImage, "rb");
41 - if (m_gzImageFile == NULL)
42 - THROW(ERR_ERRNO, errno);
43 - else
44 ---- src/client/imagefile.h
45 -+++ src/client/imagefile.h
46 -@@ -41,7 +41,7 @@
47 - COptions m_options;
48 -
49 - FILE *m_fImageFile;
50 -- gzFile *m_gzImageFile;
51 -+ gzFile m_gzImageFile;
52 - BZFILE *m_bzImageFile;
53 -
54 - int m_nFdImage;
55
56 diff --git a/sys-block/partimage/partimage-0.6.9-r2.ebuild b/sys-block/partimage/partimage-0.6.9-r2.ebuild
57 deleted file mode 100644
58 index 34732ed47292..000000000000
59 --- a/sys-block/partimage/partimage-0.6.9-r2.ebuild
60 +++ /dev/null
61 @@ -1,144 +0,0 @@
62 -# Copyright 1999-2021 Gentoo Authors
63 -# Distributed under the terms of the GNU General Public License v2
64 -
65 -EAPI=6
66 -inherit autotools flag-o-matic pam user
67 -
68 -DESCRIPTION="Console-based application to efficiently save raw partition data to image file"
69 -HOMEPAGE="http://www.partimage.org/"
70 -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
71 -
72 -LICENSE="GPL-2"
73 -SLOT="0"
74 -KEYWORDS="amd64 ~arm ~arm64 ppc ~sparc x86"
75 -IUSE="nls nologin pam ssl static"
76 -
77 -LIBS_DEPEND="app-arch/bzip2
78 - >=dev-libs/newt-0.52
79 - >=sys-libs/slang-2
80 - sys-libs/zlib:=
81 - !nologin? ( virtual/libcrypt:= )
82 - ssl? ( dev-libs/openssl:0= )"
83 -PAM_DEPEND="!static? ( pam? ( sys-libs/pam ) )"
84 -RDEPEND="${PAM_DEPEND}
85 - !static? ( ${LIBS_DEPEND} )"
86 -DEPEND="${PAM_DEPEND}
87 - ${LIBS_DEPEND}
88 - nls? ( sys-devel/gettext )"
89 -
90 -pkg_setup() {
91 - enewgroup partimag 91
92 - enewuser partimag 91 -1 /var/lib/partimage partimag
93 -}
94 -
95 -src_prepare() {
96 - eapply -p0 "${FILESDIR}"/${P}-zlib-1.2.5.2.patch #405323
97 - eapply "${FILESDIR}"/${P}-minor-typo.patch #580290
98 - eapply "${FILESDIR}"/${P}-openssl-1.1-compatibility.patch
99 - eapply "${FILESDIR}"/${P}-missing-includes.patch
100 -
101 - eapply_user
102 -
103 - eautoreconf
104 -}
105 -
106 -src_configure() {
107 - # XXX: Do we still need these?
108 - filter-flags -fno-exceptions
109 - use ppc && append-flags -fsigned-char
110 -
111 - local myconf
112 -
113 - use nologin && myconf="${myconf} --disable-login"
114 -
115 - if use pam && ! use static; then
116 - myconf="${myconf} --enable-pam"
117 - fi
118 -
119 - econf \
120 - $(use_enable nls) \
121 - $(use_enable ssl) \
122 - --disable-pam \
123 - $(use_enable static all-static) \
124 - --with-log-dir="${EPREFIX}"/var/log/partimage \
125 - ${myconf}
126 -}
127 -
128 -src_install() {
129 - default
130 -
131 - keepdir /var/lib/partimage
132 - keepdir /var/log/partimage
133 -
134 - newinitd "${FILESDIR}"/partimaged.init.2 partimaged
135 - newconfd "${FILESDIR}"/partimaged.conf partimaged
136 -
137 - if use ssl; then
138 - insinto /etc/partimaged
139 - doins "${FILESDIR}"/servercert.cnf
140 - fi
141 -
142 - if use pam; then
143 - newpamd "${FILESDIR}"/partimaged.pam.2 partimaged
144 - fi
145 -}
146 -
147 -confdir=${EROOT%/}/etc/partimaged
148 -privkey=${confdir}/partimaged.key
149 -cnf=${confdir}/servercert.cnf
150 -csr=${confdir}/partimaged.csr
151 -cert=${confdir}/partimaged.cert
152 -
153 -pkg_config() {
154 - if use ssl; then
155 - ewarn "Please customize /etc/partimaged/servercert.cnf before you continue!"
156 - ewarn "Press Ctrl-C to break now for it, or press enter to continue."
157 - read
158 - if [ ! -f ${privkey} ]; then
159 - einfo "Generating unencrypted private key: ${privkey}"
160 - openssl genrsa -out ${privkey} 1024 || die
161 - else
162 - einfo "Private key already exists: ${privkey}"
163 - fi
164 - if [ ! -f ${csr} ]; then
165 - einfo "Generating certificate request: ${csr}"
166 - openssl req -new -x509 -outform PEM -out ${csr} -key ${privkey} -config ${cnf} || die
167 - else
168 - einfo "Certificate request already exists: ${csr}"
169 - fi
170 - if [ ! -f ${cert} ]; then
171 - einfo "Generating self-signed certificate: ${cert}"
172 - openssl x509 -in ${csr} -out ${cert} -signkey ${privkey} || die
173 - else
174 - einfo "Self-signed certifcate already exists: ${cert}"
175 - fi
176 - einfo "Setting permissions"
177 - partimagesslperms || die
178 - einfo "Done"
179 - else
180 - einfo "SSL is disabled, not building certificates"
181 - fi
182 -}
183 -
184 -partimagesslperms() {
185 - local ret=0
186 - chmod 600 ${privkey} 2>/dev/null
187 - ret=$((${ret}+$?))
188 - chown partimag:0 ${privkey} 2>/dev/null
189 - ret=$((${ret}+$?))
190 - chmod 644 ${cert} ${csr} 2>/dev/null
191 - ret=$((${ret}+$?))
192 - chown root:0 ${cert} ${csr} 2>/dev/null
193 - ret=$((${ret}+$?))
194 - return $ret
195 -}
196 -
197 -pkg_postinst() {
198 - if use ssl; then
199 - einfo "To create the required SSL certificates, please do:"
200 - einfo "emerge --config =${PF}"
201 - partimagesslperms
202 - return 0
203 - fi
204 - chown partimag:0 "${EROOT%/}"/etc/partimaged/partimagedusers || die
205 -}