public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-block/partimage/files/, sys-block/partimage/
@ 2019-06-05 21:19 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2019-06-05 21:19 UTC (permalink / raw
  To: gentoo-commits

commit:     34effa1889e77d48ee03d007415c24796f52ad6c
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed May 15 17:57:06 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Jun  5 21:18:37 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34effa18

sys-block/partimage: Drop 0.6.9 (r0)

Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sys-block/partimage/files/partimaged.init  |  28 ------
 sys-block/partimage/files/partimaged.pam   |  11 ---
 sys-block/partimage/partimage-0.6.9.ebuild | 139 -----------------------------
 3 files changed, 178 deletions(-)

diff --git a/sys-block/partimage/files/partimaged.init b/sys-block/partimage/files/partimaged.init
deleted file mode 100644
index 72891f97cf9..00000000000
--- a/sys-block/partimage/files/partimaged.init
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License, v2 or later
-
-PARTIMAGED="/usr/sbin/partimaged"
-
-failed_startup() {
-	eerror "The PartImage daemon did not start up correctly."
-	eerror "Perhaps you compiled it with SSL support but forgot to run the ebuild config?"
-	return 1
-}
-
-depend() {
-	need net
-}
-
-start() {
-	ebegin "Starting partimaged"
-	start-stop-daemon --start --quiet --exec ${PARTIMAGED} \
-	-- ${PARTIMAGED_OPTS} --daemon > /dev/null 2>&1
-	eend $? || failed_startup
-}
-
-stop() {
-	ebegin "Stopping partimaged"
-	start-stop-daemon --stop --exec ${PARTIMAGED}
-	eend $?
-}

diff --git a/sys-block/partimage/files/partimaged.pam b/sys-block/partimage/files/partimaged.pam
deleted file mode 100644
index 6ffb16fdf80..00000000000
--- a/sys-block/partimage/files/partimaged.pam
+++ /dev/null
@@ -1,11 +0,0 @@
-# PAM config file for Partimaged
-
-auth required pam_unix.so
-auth required pam_warn.so
-auth required pam_listfile.so \
-	onerr=fail item=user sense=allow \
-	file=/etc/partimaged/partimagedusers
-
-account    include      system-auth
-session    include      system-auth
-

diff --git a/sys-block/partimage/partimage-0.6.9.ebuild b/sys-block/partimage/partimage-0.6.9.ebuild
deleted file mode 100644
index f0969dd38cb..00000000000
--- a/sys-block/partimage/partimage-0.6.9.ebuild
+++ /dev/null
@@ -1,139 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-inherit eutils flag-o-matic pam user
-
-DESCRIPTION="Console-based application to efficiently save raw partition data to image file"
-HOMEPAGE="http://www.partimage.org/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ppc ~sparc x86"
-IUSE="nls nologin pam ssl static"
-
-LIBS_DEPEND="app-arch/bzip2
-	>=dev-libs/newt-0.52
-	>=sys-libs/slang-2
-	sys-libs/zlib
-	ssl? ( dev-libs/openssl )"
-PAM_DEPEND="!static? ( pam? ( virtual/pam ) )"
-RDEPEND="${PAM_DEPEND}
-	!static? ( ${LIBS_DEPEND} )"
-DEPEND="${PAM_DEPEND}
-	${LIBS_DEPEND}
-	nls? ( sys-devel/gettext )"
-
-pkg_setup() {
-	enewgroup partimag 91
-	enewuser partimag 91 -1 /var/lib/partimage partimag
-}
-
-src_prepare() {
-	epatch "${FILESDIR}"/${P}-zlib-1.2.5.2.patch #405323
-	epatch "${FILESDIR}"/${P}-minor-typo.patch #580290
-}
-
-src_configure() {
-	# XXX: Do we still need these?
-	filter-flags -fno-exceptions
-	use ppc && append-flags -fsigned-char
-
-	local myconf
-
-	use nologin && myconf="${myconf} --disable-login"
-
-	if use pam && ! use static; then
-		myconf="${myconf} --enable-pam"
-	fi
-
-	econf \
-		--docdir="${EPREFIX}"/usr/share/doc/${PF} \
-		--sysconfdir="${EPREFIX}"/etc \
-		$(use_enable nls) \
-		$(use_enable ssl) \
-		--disable-pam \
-		$(use_enable static all-static) \
-		--with-log-dir="${EPREFIX}"/var/log/partimage \
-		${myconf}
-}
-
-src_install() {
-	default
-
-	keepdir /var/lib/partimage
-	keepdir /var/log/partimage
-
-	newinitd "${FILESDIR}"/partimaged.init.2 partimaged
-	newconfd "${FILESDIR}"/partimaged.conf partimaged
-
-	if use ssl; then
-		insinto /etc/partimaged
-		doins "${FILESDIR}"/servercert.cnf
-	fi
-
-	if use pam; then
-		newpamd "${FILESDIR}"/partimaged.pam.2 partimaged
-	fi
-}
-
-confdir=${EROOT}/etc/partimaged
-privkey=${confdir}/partimaged.key
-cnf=${confdir}/servercert.cnf
-csr=${confdir}/partimaged.csr
-cert=${confdir}/partimaged.cert
-
-pkg_config() {
-	if use ssl; then
-		ewarn "Please customize /etc/partimaged/servercert.cnf before you continue!"
-		ewarn "Press Ctrl-C to break now for it, or press enter to continue."
-		read
-		if [ ! -f ${privkey} ]; then
-			einfo "Generating unencrypted private key: ${privkey}"
-			openssl genrsa -out ${privkey} 1024 || die
-		else
-			einfo "Private key already exists: ${privkey}"
-		fi
-		if [ ! -f ${csr} ]; then
-			einfo "Generating certificate request: ${csr}"
-			openssl req -new -x509 -outform PEM -out ${csr} -key ${privkey} -config ${cnf} || die
-		else
-			einfo "Certificate request already exists: ${csr}"
-		fi
-		if [ ! -f ${cert} ]; then
-			einfo "Generating self-signed certificate: ${cert}"
-			openssl x509 -in ${csr} -out ${cert} -signkey ${privkey} || die
-		else
-			einfo "Self-signed certifcate already exists: ${cert}"
-		fi
-		einfo "Setting permissions"
-		partimagesslperms || die
-		einfo "Done"
-	else
-		einfo "SSL is disabled, not building certificates"
-	fi
-}
-
-partimagesslperms() {
-	local ret=0
-	chmod 600 ${privkey} 2>/dev/null
-	ret=$((${ret}+$?))
-	chown partimag:0 ${privkey} 2>/dev/null
-	ret=$((${ret}+$?))
-	chmod 644 ${cert} ${csr} 2>/dev/null
-	ret=$((${ret}+$?))
-	chown root:0 ${cert} ${csr} 2>/dev/null
-	ret=$((${ret}+$?))
-	return $ret
-}
-
-pkg_postinst() {
-	if use ssl; then
-		einfo "To create the required SSL certificates, please do:"
-		einfo "emerge  --config =${PF}"
-		partimagesslperms
-		return 0
-	fi
-	chown partimag:0 "${EROOT}"/etc/partimaged/partimagedusers || die
-}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-block/partimage/files/, sys-block/partimage/
@ 2022-12-10  0:22 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-12-10  0:22 UTC (permalink / raw
  To: gentoo-commits

commit:     3d26a94093a87892edea7a69ff38722ad03954b6
Author:     John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  9 22:32:57 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 00:21:45 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d26a940

sys-block/partimage: fix musl build failure

Additionally, this should let us treeclean partimage from ::musl, fixing
the CI failure due to partimage::musl's use of user.eclass.

Bug: https://bugs.gentoo.org/853883
Bug: https://bugs.gentoo.org/884993
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/28621
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/partimage-0.6.9-musl-null-type.patch     |  34 +++++
 sys-block/partimage/partimage-0.6.9-r4.ebuild      | 142 +++++++++++++++++++++
 2 files changed, 176 insertions(+)

diff --git a/sys-block/partimage/files/partimage-0.6.9-musl-null-type.patch b/sys-block/partimage/files/partimage-0.6.9-musl-null-type.patch
new file mode 100644
index 000000000000..fddf4b2dbc80
--- /dev/null
+++ b/sys-block/partimage/files/partimage-0.6.9-musl-null-type.patch
@@ -0,0 +1,34 @@
+In newer musl, the type of NULL in C++ is nullptr rather than an
+integer.
+
+Upstream: https://git.musl-libc.org/cgit/musl/commit/?id=98e688a9da5e7b2925dda17a2d6820dddf1fb287
+Bug: https://bugs.gentoo.org/853883
+
+diff --git a/src/server/partimaged-client.cpp b/src/server/partimaged-client.cpp
+index 7c5f856..35b3514 100644
+--- a/src/server/partimaged-client.cpp
++++ b/src/server/partimaged-client.cpp
+@@ -89,9 +89,9 @@ void CPartimagedClients::Release(unsigned int client)
+   pthread_mutex_lock(&mClients);
+   showDebug(1, "%d released\n", client);
+   shutdown(Clients[client].Sock, SHUT_RDWR);
+-  Clients[client].Sock = NULL;
++  Clients[client].Sock = 0x0;
+   Clients[client].Present = false;
+-  Clients[client].MyPid = NULL;
++  Clients[client].MyPid = 0x0;
+   pthread_mutex_unlock(&mClients);
+ }
+ 
+@@ -109,9 +109,9 @@ void CPartimagedClients::ReleaseClientByPid(unsigned int client_pid)
+           found = true;
+           showDebug(1, "client %d pid = %d released by pid\n", next, client_pid);
+           shutdown(Clients[next].Sock, SHUT_RDWR);
+-          Clients[next].Sock = NULL;
++          Clients[next].Sock = 0x0;
+           Clients[next].Present = false;
+-          Clients[next].MyPid = NULL;
++          Clients[next].MyPid = 0x0;
+ 	    }
+       else
+         next++;

diff --git a/sys-block/partimage/partimage-0.6.9-r4.ebuild b/sys-block/partimage/partimage-0.6.9-r4.ebuild
new file mode 100644
index 000000000000..e2033e200544
--- /dev/null
+++ b/sys-block/partimage/partimage-0.6.9-r4.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic pam
+
+DESCRIPTION="Console-based application to efficiently save raw partition data to image file"
+HOMEPAGE="https://www.partimage.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~riscv ~sparc ~x86"
+IUSE="nls nologin pam ssl static"
+REQUIRED_USE="static? ( !pam )"
+
+COMMON_DEPEND="
+	acct-group/partimag
+	acct-user/partimag
+"
+LIBS_DEPEND="
+	app-arch/bzip2
+	>=dev-libs/newt-0.52
+	>=sys-libs/slang-2
+	sys-libs/zlib:=
+	!nologin? ( virtual/libcrypt:= )
+	ssl? ( dev-libs/openssl:0= )
+"
+PAM_DEPEND="pam? ( sys-libs/pam )"
+RDEPEND="
+	${COMMON_DEPEND}
+	${PAM_DEPEND}
+	!static? ( ${LIBS_DEPEND} )
+"
+DEPEND="
+	${PAM_DEPEND}
+	${LIBS_DEPEND}
+"
+BDEPEND="
+	${COMMON_DEPEND}
+	nls? ( sys-devel/gettext )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.6.9-zlib-1.2.5.2-r1.patch #405323
+	"${FILESDIR}"/${PN}-0.6.9-minor-typo.patch #580290
+	"${FILESDIR}"/${PN}-0.6.9-openssl-1.1-compatibility.patch
+	"${FILESDIR}"/${PN}-0.6.9-missing-includes.patch
+	"${FILESDIR}"/${PN}-0.6.9-clang.patch
+	"${FILESDIR}"/${PN}-0.6.9-musl-null-type.patch #853883
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	# XXX: Do we still need these?
+	filter-flags -fno-exceptions
+	use ppc && append-flags -fsigned-char
+
+	local myeconfargs=(
+		$(use_enable nls)
+		$(usex nologin '--disable-login' '')
+		$(use_enable pam)
+		$(use_enable ssl)
+		$(use_enable static all-static)
+		--with-log-dir="${EPREFIX}"/var/log/partimage
+	)
+
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+
+	keepdir /var/lib/partimage
+	keepdir /var/log/partimage
+
+	newinitd "${FILESDIR}"/partimaged.init.2 partimaged
+	newconfd "${FILESDIR}"/partimaged.conf partimaged
+
+	if use pam; then
+		newpamd "${FILESDIR}"/partimaged.pam.2 partimaged
+	fi
+
+	if use ssl; then
+		insinto /etc/partimaged
+		doins "${FILESDIR}"/servercert.cnf
+	fi
+
+	fowners partimag:root /etc/partimaged/partimagedusers
+}
+
+pkg_config() {
+	if use ssl; then
+		local confdir="${EROOT}"/etc/partimaged
+		local privkey="${confdir}"/partimaged.key
+		local cnf="${confdir}"/servercert.cnf
+		local csr="${confdir}"/partimaged.csr
+		local cert="${confdir}"/partimaged.cert
+
+		ewarn "Please customize /etc/partimaged/servercert.cnf before you continue!"
+		ewarn "Press Ctrl-C to break now for it, or press enter to continue."
+		read
+		if [ ! -f "${privkey}" ]; then
+			einfo "Generating unencrypted private key: ${privkey}"
+			openssl genrsa -out "${privkey}" 2048 || die
+		else
+			einfo "Private key already exists: ${privkey}"
+		fi
+		if [ ! -f "${csr}" ]; then
+			einfo "Generating certificate request: ${csr}"
+			openssl req -new -x509 -outform PEM -out "${csr}" -key "${privkey}" -config "${cnf}" || die
+		else
+			einfo "Certificate request already exists: ${csr}"
+		fi
+		if [ ! -f "${cert}" ]; then
+			einfo "Generating self-signed certificate: ${cert}"
+			openssl x509 -in "${csr}" -out "${cert}" -signkey "${privkey}" || die
+		else
+			einfo "Self-signed certifcate already exists: ${cert}"
+		fi
+		einfo "Setting permissions"
+		chmod 600 "${privkey}" || die
+		chown partimag:root "${privkey}" || die
+		chmod 644 "${cert}" "${csr}" || die
+		chown root:root "${cert}" "${csr}" || die
+		einfo "Done"
+	else
+		einfo "SSL is disabled, not building certificates"
+	fi
+}
+
+pkg_postinst() {
+	if use ssl; then
+		einfo "To create the required SSL certificates, please do:"
+		einfo "emerge --config =${PF}"
+	fi
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-10  0:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-05 21:19 [gentoo-commits] repo/gentoo:master commit in: sys-block/partimage/files/, sys-block/partimage/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2022-12-10  0:22 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox