Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 529354

Summary: app-portage/portage-utils-0.53: qsize fails w/musl due to undefined S_BLKSIZE
Product: Portage Development Reporter: DaggyStyle <daggs>
Component: ToolsAssignee: Portage Utils Team <portage-utils>
Status: RESOLVED FIXED    
Severity: normal CC: gentoo, vapier
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: hardened-devel repo, musl overlay
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: patch
patch v2
patch v3
patch v4

Description DaggyStyle 2014-11-15 16:21:08 UTC
this patch allow app-portage/portage-utils-0.53 to compile and run under gentoo over musl

Reproducible: Always
Comment 1 DaggyStyle 2014-11-15 16:21:38 UTC
Created attachment 389418 [details, diff]
patch
Comment 2 Felix Janda 2014-11-15 18:33:10 UTC
It might be better to use DEV_BSIZE from <sys/param.h> instead of S_BLKSIZE. Seems to be more portable (in particular musl has it, too). POSIX at least mentions DEV_BSIZE as the size of the blocks corresponding to st_blocks on some implementations.
Comment 3 DaggyStyle 2014-11-16 18:40:42 UTC
Created attachment 389520 [details, diff]
patch v2

patch based on the suggestion given above
Comment 4 Felix Janda 2014-11-16 19:42:12 UTC
Created attachment 389528 [details, diff]
patch v3

This is rather what I meant. (No multiple declarations of S_BLKSIZE on platforms which have it.) Just polishing it up for upstream...
Comment 5 DaggyStyle 2014-11-16 20:57:56 UTC
(In reply to Felix Janda from comment #4)
> Created attachment 389528 [details, diff] [details, diff]
> patch v3
> 
> This is rather what I meant. (No multiple declarations of S_BLKSIZE on
> platforms which have it.) Just polishing it up for upstream...

I blame my boss, he likes small patches as possible :)
Comment 6 SpanKY gentoo-dev 2014-11-18 01:37:10 UTC
Comment on attachment 389520 [details, diff]
patch v2

look at libq/compat.c where it already hides the system layer junk.  we do not want to pollute the various applets with this logic.
Comment 7 Felix Janda 2014-11-18 18:06:51 UTC
Created attachment 389642 [details, diff]
patch v4
Comment 8 Felix Janda 2015-01-02 10:24:03 UTC
Is patch v4 ok to be accepted?
Comment 9 Anthony Basile gentoo-dev 2015-01-03 16:40:22 UTC
(In reply to Felix Janda from comment #8)
> Is patch v4 ok to be accepted?

let's get this in the overlay for now.  please make a single commit against hardened-dev::musl overlay and upload the patch
Comment 10 Felix Janda 2015-01-31 22:31:46 UTC
portage-utils is already in the overlay.
Comment 11 SpanKY gentoo-dev 2015-02-16 11:47:58 UTC
(In reply to Felix Janda from comment #7)

odd ... why is the patch against 0.9 ?

at any rate, i've hand merged it into git:
http://git.overlays.gentoo.org/gitweb/?p=proj/portage-utils.git;a=commitdiff;h=b990a48b85b71f94323120e50f2ba97958351a97
Comment 12 Anthony Basile gentoo-dev 2015-02-16 14:23:10 UTC
(In reply to SpanKY from comment #11)
> (In reply to Felix Janda from comment #7)
> 
> odd ... why is the patch against 0.9 ?
> 
> at any rate, i've hand merged it into git:
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage-utils.git;a=commitdiff;
> h=b990a48b85b71f94323120e50f2ba97958351a97

No idea.  But for the records, in the overlay we have the patch against 0.53.  We'll drop that once 0.54 rolls out.
Comment 13 Felix Janda 2015-02-18 18:02:41 UTC
I had assumed that 0.9 was closer to git HEAD. (dunno why I didn't patch against git)

Anyway thanks for the commit.
Comment 14 SpanKY gentoo-dev 2015-02-20 22:19:57 UTC
it'll be in the next release
Comment 15 SpanKY gentoo-dev 2015-06-10 15:49:05 UTC
*** Bug 551604 has been marked as a duplicate of this bug. ***