Bug 125260 - archivers/pbzip2: PRIu64 macro not being expanded correctly and leaking into -v output
Summary: archivers/pbzip2: PRIu64 macro not being expanded correctly and leaking into ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-04 12:50 UTC by Geoff The
Modified: 2008-09-23 15:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geoff The 2008-07-04 12:50:02 UTC
The PRIu64 macros being used to output byte sizes are not being expanded correctly.  E.g.

% /usr/local/bin/pbzip2 -rv AUTHORS 
Parallel BZIP2 v1.0.2 - by: Jeff Gilchrist [http://compression.ca]
[July 25, 2007]             (uses libbzip2 by Julian Seward)

         # CPUs: 2
 BWT Block Size: 900k
File Block Size: 900k
-------------------------------------------
         File #: 1 of 1
     Input Name: AUTHORS
    Output Name: AUTHORS.bz2

     Input Size: PRIu64 bytes
Compressing data...
    Output Size: PRIu64 bytes
-------------------------------------------

     Wall Clock: 0.052543 seconds

Fix: 

Locally, I've replaced all instances of PRIu64 with llu, but this is platform-specific.
Comment 1 Edwin Groothuis freebsd_committer 2008-07-04 12:50:16 UTC
Responsible Changed
From-To: freebsd-ports-bugs->infofarmer

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Pav Lucistnik freebsd_committer 2008-09-05 17:12:00 UTC
Hi folks, the problem is caused by incorrect patching in the port.
The fix is attached. According to cvs history, the patching was made to
allow compilation on FreeBSD 4.x, which we don't support anymore, so it
can be just removed.

Andrew, do you approve this patch?

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/archivers/pbzip2/Makefile,v
retrieving revision 1.14
diff -a -u -r1.14 Makefile
--- Makefile	30 Jul 2007 16:24:27 -0000	1.14
+++ Makefile	5 Sep 2008 16:09:05 -0000
@@ -9,9 +9,10 @@
 PORTNAME=	pbzip2
 PORTVERSION=	1.0.2.0.2
 DISTVERSION=	1.0.2
+PORTREVISION=	1
 CATEGORIES=	archivers
 MASTER_SITES=	http://compression.ca/pbzip2/ CENKES
-DIST_SUBDIR=	${PKGNAME}
+DIST_SUBDIR=	${PORTNAME}-${PORTVERSION}
 
 MAINTAINER=	infofarmer@FreeBSD.org
 COMMENT=	Parallel BZIP2
@@ -27,8 +28,6 @@
 		s,-O3,${CXXFLAGS},; \
 		s,^CC,#CC,; \
 		s,CC,CXX,' ${WRKSRC}/Makefile
-	@${REINPLACE_CMD} -e 's,PRIu64 "Lu",PRIu64 Lu,;s,"PRIu64",#PRIu64,g' \
-		${WRKSRC}/pbzip2.cpp
 
 do-install:
 	@${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/

-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

The Linimon's Rule: The More You Close, The More Will Come
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2008-09-07 01:21:40 UTC
Responsible Changed
From-To: infofarmer->freebsd-ports-bugs

Maintainer was reset.
Comment 4 Dmitry Marakasov freebsd_committer 2008-09-12 15:22:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->amdmi3

I'll take it.
Comment 5 dfilter service freebsd_committer 2008-09-23 14:52:32 UTC
amdmi3      2008-09-23 13:52:28 UTC

  FreeBSD ports repository

  Modified files:
    archivers/pbzip2     Makefile 
  Log:
  - Remove bogus REINPLACE_CMD which was intended to fix build on 4.x, but has broken program output instead.
  - While here, line up MAN and MLINKS lines
  
  PR:             125260
  Submitted by:   Geoff The <geoff2k at gmail dot com>
  Patch by:       pav@
  
  Revision  Changes    Path
  1.16      +4 -5      ports/archivers/pbzip2/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Dmitry Marakasov freebsd_committer 2008-09-23 14:52:38 UTC
State Changed
From-To: open->closed

Committed. Thanks!