public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/sg3_utils/files/, sys-apps/sg3_utils/
@ 2016-04-18 22:38 Mike Frysinger
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2016-04-18 22:38 UTC (permalink / raw
  To: gentoo-commits

commit:     1e8b41c1ec1fe0a622eafe91993edd4eb28fcb4e
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 18 22:38:33 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Apr 18 22:38:33 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e8b41c1

sys-apps/sg3_utils: fix build w/newer glibc #580236

 .../sg3_utils/files/sg3_utils-1.42-sysmacros.patch | 31 ++++++++++++++++++++++
 sys-apps/sg3_utils/sg3_utils-1.42.ebuild           |  3 ++-
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch b/sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch
new file mode 100644
index 0000000..e8440fb
--- /dev/null
+++ b/sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch
@@ -0,0 +1,31 @@
+From 13ff34d408cf69339ce1f28756f5c7b5ad5f528b Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 18 Apr 2016 18:36:09 -0400
+Subject: [PATCH] include sys/sysmacros.h for major/minor funcs
+
+These functions are not part of any official spec, and glibc has always
+kept them in sys/sysmacros.h.  As glibc moves to conform to POSIX, and
+more alternative C libraries come up, we need to include this header
+explicitly to get the prototypes.  Otherwise we fail to build like:
+
+sg_map26.o: In function 'nd_match_scandir_select':
+sg_map26.c:(.text+0x37b): undefined reference to 'major'
+---
+ include/sg_lib.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/sg_lib.h b/include/sg_lib.h
+index b3e741b..a0e483c 100644
+--- a/include/sg_lib.h
++++ b/include/sg_lib.h
+@@ -32,6 +32,7 @@
+ 
+ #include <stdio.h>
+ #include <stdint.h>
++#include <sys/sysmacros.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+-- 
+2.7.4
+

diff --git a/sys-apps/sg3_utils/sg3_utils-1.42.ebuild b/sys-apps/sg3_utils/sg3_utils-1.42.ebuild
index 081198b..7c366e7 100644
--- a/sys-apps/sg3_utils/sg3_utils-1.42.ebuild
+++ b/sys-apps/sg3_utils/sg3_utils-1.42.ebuild
@@ -20,7 +20,8 @@ RDEPEND=""
 PDEPEND=">=sys-apps/rescan-scsi-bus-1.24"
 
 src_prepare() {
-	epatch "${FILESDIR}"/${PN}-1.26-stdint.patch
+	epatch "${FILESDIR}"/${PN}-1.26-stdint.patch #580236
+	epatch "${FILESDIR}"/${PN}-1.42-sysmacros.patch #580236
 }
 
 src_configure() {


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/sg3_utils/files/, sys-apps/sg3_utils/
@ 2021-03-30  7:46 Lars Wendler
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Wendler @ 2021-03-30  7:46 UTC (permalink / raw
  To: gentoo-commits

commit:     fe0e67436f07e5925a6f7d2a2efa31a5724f1bbb
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 30 07:45:26 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Mar 30 07:46:29 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe0e6743

Revert "sys-apps/sg3_utils: Removed old"

This reverts commit c61d54adec2c539872bd05b5c28703e61a2787a0
until sys-apps/rescan-scsi-bus has been last-rited

Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-apps/sg3_utils/Manifest                        |  1 +
 .../sg3_utils/files/sg3_utils-1.42-sysmacros.patch | 31 +++++++++++++++
 sys-apps/sg3_utils/sg3_utils-1.42.ebuild           | 44 ++++++++++++++++++++++
 3 files changed, 76 insertions(+)

diff --git a/sys-apps/sg3_utils/Manifest b/sys-apps/sg3_utils/Manifest
index c9b155de994..fb01d7cf889 100644
--- a/sys-apps/sg3_utils/Manifest
+++ b/sys-apps/sg3_utils/Manifest
@@ -1,3 +1,4 @@
+DIST sg3_utils-1.42.tgz 1219231 BLAKE2B dd9ea2c324cb6f4c0ce770c90b7980da5e998bddc3a2be43a0aa9bea88dfe34291d0f58b393b2a5ac680c05dc673802ec9fae1ead37107bc49fa33bc7c4df503 SHA512 d16b65e36b2bccb4fc4c189f97e71fa38e6619f37d668a4ddd74a52c715fa62325288d9737812ed19c80547059dbd27be5a20565e27e1aabb571e8f5f8ac53ad
 DIST sg3_utils-1.44.tar.xz 922152 BLAKE2B 8596ef78fbb7ade5a969f485b0f4ff63863dc8a5ff58fe630cffa91900ba9946b47ddf857346aa3904da8502afa4928f54baf99428344d2e561a90e52c8533ed SHA512 4f4d5536ebed62f2c81c55741043d9ac3f4610a4dd6ef2e3125f041afd57aae03a32c2affe84a960c9f61fb6f84784bc901c756a8c36c1bc97082fa61e73ae8d
 DIST sg3_utils-1.45.tar.xz 989864 BLAKE2B 2d0a9e0edf514c8c7a566798f8087fc27d15d31cc8df39073dd97cff569da396b24236e0c231781625379b2ecefe7c99716d5d9c7dc104b15e150cb4e3c43e75 SHA512 fa25dedc447154d33937248a856af9a7ef380dda282a681d465a57d7dfc24b6c0409fa06aabf8cc28ba191e91db80fed0757b45212eddf713855574b48a97868
 DIST sg3_utils-1.46.tar.xz 1031972 BLAKE2B bf425b97247a5f5bae06a84d68066e2e2ec107a5c6d410f6d04a8879be22a07d5f5d0718674072458e654a4de3facb575522962beb2297a1fb4a7fe0df01b977 SHA512 576531da5022c5c2b3099bb28b3806a86d03594f572b8e72c5d451253e5b88761654027315749362b5037dd6108b691bd74566482b9c5078e3b1e5a2bb6e1a67

diff --git a/sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch b/sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch
new file mode 100644
index 00000000000..e8440fb8c32
--- /dev/null
+++ b/sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch
@@ -0,0 +1,31 @@
+From 13ff34d408cf69339ce1f28756f5c7b5ad5f528b Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 18 Apr 2016 18:36:09 -0400
+Subject: [PATCH] include sys/sysmacros.h for major/minor funcs
+
+These functions are not part of any official spec, and glibc has always
+kept them in sys/sysmacros.h.  As glibc moves to conform to POSIX, and
+more alternative C libraries come up, we need to include this header
+explicitly to get the prototypes.  Otherwise we fail to build like:
+
+sg_map26.o: In function 'nd_match_scandir_select':
+sg_map26.c:(.text+0x37b): undefined reference to 'major'
+---
+ include/sg_lib.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/sg_lib.h b/include/sg_lib.h
+index b3e741b..a0e483c 100644
+--- a/include/sg_lib.h
++++ b/include/sg_lib.h
+@@ -32,6 +32,7 @@
+ 
+ #include <stdio.h>
+ #include <stdint.h>
++#include <sys/sysmacros.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+-- 
+2.7.4
+

diff --git a/sys-apps/sg3_utils/sg3_utils-1.42.ebuild b/sys-apps/sg3_utils/sg3_utils-1.42.ebuild
new file mode 100644
index 00000000000..56b30e53972
--- /dev/null
+++ b/sys-apps/sg3_utils/sg3_utils-1.42.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib ltprune
+
+DESCRIPTION="Apps for querying the sg SCSI interface"
+HOMEPAGE="http://sg.danny.cz/sg/"
+SRC_URI="http://sg.danny.cz/sg/p/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
+IUSE="static-libs"
+
+DEPEND="sys-devel/libtool"
+RDEPEND=""
+PDEPEND=">=sys-apps/rescan-scsi-bus-1.24"
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PN}-1.26-stdint.patch #580236
+	epatch "${FILESDIR}"/${PN}-1.42-sysmacros.patch #580236
+}
+
+src_configure() {
+	econf $(use_enable static-libs static)
+}
+
+src_install() {
+	default
+	dodoc COVERAGE doc/README examples/*.txt
+	newdoc scripts/README README.scripts
+
+	# Better fix for bug 231089; some packages look for sgutils2
+	local path lib
+	path="/usr/$(get_libdir)"
+	for lib in "${ED}"${path}/libsgutils2.*; do
+		lib=${lib##*/}
+		dosym "${lib}" "${path}/${lib/libsgutils2/libsgutils}"
+	done
+
+	prune_libtool_files
+}


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/sg3_utils/files/, sys-apps/sg3_utils/
@ 2022-12-26  8:35 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2022-12-26  8:35 UTC (permalink / raw
  To: gentoo-commits

commit:     7d1baf30c68a76b9530c5752a0de9e5569221017
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 26 08:27:11 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Dec 26 08:33:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d1baf30

sys-apps/sg3_utils: drop 1.46-r1

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/sg3_utils/Manifest                        |  1 -
 .../files/sg3_utils-1.46-musl-drand48-compat.patch | 99 ----------------------
 sys-apps/sg3_utils/sg3_utils-1.46-r1.ebuild        | 42 ---------
 3 files changed, 142 deletions(-)

diff --git a/sys-apps/sg3_utils/Manifest b/sys-apps/sg3_utils/Manifest
index 39cbf40dd6fb..4bbf431de396 100644
--- a/sys-apps/sg3_utils/Manifest
+++ b/sys-apps/sg3_utils/Manifest
@@ -1,2 +1 @@
-DIST sg3_utils-1.46.tar.xz 1031800 BLAKE2B 034af23d10da49938979ea4d0041c6ce4309b9ceac13f06bd524011dccf285e88fbc5f4c3f261ec3e316db86278ccff235015de43d98b0b62ff05a2f98df0850 SHA512 0b4caab97ccc11fb45e88219e460b37c6ff69b8f3c79e513279aef51783ff22399d141253abdbf55db198db0815bc39d30e9b1e3bd7dda5e15c5f4dae3fe89cf
 DIST sg3_utils-1.47.tar.xz 1046904 BLAKE2B 6efadd86f6d466469f5d5d3f53b2b6bf01143695db19e96b55a13a606d8a36d5571e390fed0b0990371dc4b77714f88c03f440a4468f6863544c0d21b2e3ef73 SHA512 ef072b8f0012d0944e21d2134aff7125e24ea24d1cbbb1aa79160e844f9a60236f1e244437a3bc08a22a7e99f613adad4a05ae5cc3916ded5a72d162cd3aa163

diff --git a/sys-apps/sg3_utils/files/sg3_utils-1.46-musl-drand48-compat.patch b/sys-apps/sg3_utils/files/sg3_utils-1.46-musl-drand48-compat.patch
deleted file mode 100644
index d4152c3d2651..000000000000
--- a/sys-apps/sg3_utils/files/sg3_utils-1.46-musl-drand48-compat.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-diff -Naurp sg3_utils-1.46.orig/doc/sg_dd.8 sg3_utils-1.46/doc/sg_dd.8
---- sg3_utils-1.46.orig/doc/sg_dd.8	2021-03-22 00:36:43.000000000 -0400
-+++ sg3_utils-1.46/doc/sg_dd.8	2021-08-16 14:07:16.703526168 -0400
-@@ -394,7 +394,7 @@ random
- this flag is only active with \fIiflag=\fR and when given replaces
- \fIif=IFILE\fR. If both are given an error is generated. The input will
- be a stream of pseudo random bytes. The Linux getrandom(2) system call is
--used to create a seed and thereadter mrand48_r(3) is used to generate a
-+used to create a seed and thereadter mrand48(3) is used to generate a
- pseudo random sequence, 4 bytes at a time. The quality of the randomness
- can be viewed with the ent(1) utility. This is not a high quality random
- number generator, it is built for speed, not quality. One application is
-diff -Naurp sg3_utils-1.46.orig/src/sg_dd.c sg3_utils-1.46/src/sg_dd.c
---- sg3_utils-1.46.orig/src/sg_dd.c	2021-03-27 20:58:36.000000000 -0400
-+++ sg3_utils-1.46/src/sg_dd.c	2021-08-16 12:56:26.316550042 -0400
-@@ -176,7 +176,6 @@ static uint8_t * free_zeros_buff = NULL;
- static int read_long_blk_inc = READ_LONG_DEF_BLK_INC;
- 
- static long seed;
--static struct drand48_data drand;/* opaque, used by srand48_r and mrand48_r */
- 
- static const char * proc_allow_dio = "/proc/scsi/sg/allow_dio";
- 
-@@ -2124,7 +2123,7 @@ main(int argc, char * argv[])
- #endif
-         if (verbose > 1)
-             pr2serr("seed=%ld\n", seed);
--        srand48_r(seed, &drand);
-+        srand48(seed);
-     } else if (iflag.zero) {
-        ccp = "<zero bytes>";
-        cc2p = "00";
-@@ -2401,7 +2400,7 @@ main(int argc, char * argv[])
-                 for (kk = 0; kk < blocks; ++kk, bp += blk_sz) {
-                     for (j = 0; j < blk_sz; j += jbump) {
-                        /* mrand48 takes uniformly from [-2^31, 2^31) */
--                        mrand48_r(&drand, &rn);
-+                        rn = mrand48();
-                         *((uint32_t *)(bp + j)) = (uint32_t)rn;
-                     }
-                 }
-diff -Naurp sg3_utils-1.46.orig/testing/sgh_dd.cpp sg3_utils-1.46/testing/sgh_dd.cpp
---- sg3_utils-1.46.orig/testing/sgh_dd.cpp	2021-03-28 21:27:17.000000000 -0400
-+++ sg3_utils-1.46/testing/sgh_dd.cpp	2021-08-16 14:06:37.262536902 -0400
-@@ -312,7 +312,6 @@ typedef struct request_element
-     uint32_t in_mrq_q_blks;
-     uint32_t out_mrq_q_blks;
-     long seed;
--    struct drand48_data drand;  /* opaque, used by srand48_r and mrand48_r */
-     pthread_t mrq_abort_thread_id;
-     Mrq_abort_info mai;
- } Rq_elem;
-@@ -1491,7 +1490,7 @@ read_write_thread(void * v_tip)
- #endif
-         if (vb > 1)
-             pr2serr_lk("thread=%d: seed=%ld\n", rep->id, rep->seed);
--        srand48_r(rep->seed, &rep->drand);
-+        srand48(rep->seed);
-     }
-     if (clp->in_flags.same_fds || clp->out_flags.same_fds)
-         ;
-@@ -1804,7 +1803,7 @@ normal_in_rd(Rq_elem * rep, int blocks)
-             for (k = 0, bp = rep->buffp; k < blocks; ++k, bp += clp->bs) {
-                 for (j = 0; j < clp->bs; j += jbump) {
-                     /* mrand48 takes uniformly from [-2^31, 2^31) */
--                    mrand48_r(&rep->drand, &rn);
-+                    rn = mrand48();
-                     *((uint32_t *)(bp + j)) = (uint32_t)rn;
-                 }
-             }
-diff -Naurp sg3_utils-1.46.orig/testing/sg_mrq_dd.cpp sg3_utils-1.46/testing/sg_mrq_dd.cpp
---- sg3_utils-1.46.orig/testing/sg_mrq_dd.cpp	2021-03-28 21:27:17.000000000 -0400
-+++ sg3_utils-1.46/testing/sg_mrq_dd.cpp	2021-08-16 14:06:45.842752108 -0400
-@@ -313,7 +313,6 @@ typedef struct request_element
-     int out_local_partial;
-     int in_resid_bytes;
-     long seed;
--    struct drand48_data drand; /* opaque, used by srand48_r and mrand48_r */
- } Rq_elem;
- 
- /* Additional parameters for sg_start_io() and sg_finish_io() */
-@@ -1310,7 +1309,7 @@ read_write_thread(struct global_collecti
- #endif
-         if (vb > 1)
-             pr2serr_lk("[%d] %s: seed=%ld\n", id, __func__, rep->seed);
--        srand48_r(rep->seed, &rep->drand);
-+        srand48(rep->seed);
-     }
- 
-     if (in_is_sg && clp->infp) {
-@@ -1524,7 +1523,7 @@ normal_in_rd(Rq_elem * rep, int64_t lba,
-             for (k = 0; k < blocks; ++k, bp += clp->bs) {
-                 for (j = 0; j < clp->bs; j += jbump) {
-                    /* mrand48 takes uniformly from [-2^31, 2^31) */
--                    mrand48_r(&rep->drand, &rn);
-+                    rn = mrand48();
-                     *((uint32_t *)(bp + j)) = (uint32_t)rn;
-                 }
-             }

diff --git a/sys-apps/sg3_utils/sg3_utils-1.46-r1.ebuild b/sys-apps/sg3_utils/sg3_utils-1.46-r1.ebuild
deleted file mode 100644
index 51068d8dc71a..000000000000
--- a/sys-apps/sg3_utils/sg3_utils-1.46-r1.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="8"
-
-DESCRIPTION="Apps for querying the sg SCSI interface"
-HOMEPAGE="https://sg.danny.cz/sg/"
-#SRC_URI="https://github.com/hreinecke/sg3_utils/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-SRC_URI="https://sg.danny.cz/sg/p/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0/${PV}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="static-libs"
-
-DEPEND="sys-devel/libtool"
-RDEPEND="!sys-apps/rescan-scsi-bus"
-
-PATCHES=(
-	# Bug #808600
-	"${FILESDIR}"/${PN}-1.46-musl-drand48-compat.patch
-)
-
-src_configure() {
-	econf $(use_enable static-libs static)
-}
-
-src_install() {
-	default
-	dodoc COVERAGE doc/README examples/*.txt
-	newdoc scripts/README README.scripts
-
-	find "${ED}" -type f -name "*.la" -delete || die
-
-	# Better fix for bug 231089; some packages look for sgutils2
-	local path lib
-	path="/usr/$(get_libdir)"
-	for lib in "${ED}/"${path}/libsgutils2{,-${PV}}.*; do
-		lib=${lib##*/}
-		dosym "${lib}" "${path}/${lib/libsgutils2/libsgutils}"
-	done
-}


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

end of thread, other threads:[~2022-12-26  8:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-18 22:38 [gentoo-commits] repo/gentoo:master commit in: sys-apps/sg3_utils/files/, sys-apps/sg3_utils/ Mike Frysinger
  -- strict thread matches above, loose matches on Subject: below --
2021-03-30  7:46 Lars Wendler
2022-12-26  8:35 Sam James

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