Bug 729475 - mhddfs 0.1.38-6 is not built with $RPM_OPT_FLAGS
Summary: mhddfs 0.1.38-6 is not built with $RPM_OPT_FLAGS
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mhddfs
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jameson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: DebugInfo
TreeView+ depends on / blocked
 
Reported: 2011-08-09 20:26 UTC by Ville Skyttä
Modified: 2011-08-26 19:09 UTC (History)
2 users (show)

Fixed In Version: mhddfs-0.1.38-9.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-23 20:27:52 UTC


Attachments (Terms of Use)

Description Ville Skyttä 2011-08-09 20:26:49 UTC
mhddfs 0.1.38-6 is not built with $RPM_OPT_FLAGS:

http://kojipkgs.fedoraproject.org/packages/mhddfs/0.1.38/6.fc17/data/logs/x86_64/build.log

Cc'ing reviewer.

Comment 1 Fedora Update System 2011-08-09 23:18:13 UTC
mhddfs-0.1.38-7.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mhddfs-0.1.38-7.fc14

Comment 2 Nathan Owe 2011-08-09 23:36:08 UTC
Wow one thing that is weird, I can not find the review I did for mhddfs in my list of bugs or by searching.

I looked at the SPEC file and it seems to have been fixed. Every branch, master, f16, f15, f14 now has make %{?_smp_mflags}. Above it appears that f14 has been submited for an update. So this bug should be closed after mhddfs is accepted in bodhi.

Comment 3 Fedora Update System 2011-08-10 00:36:11 UTC
mhddfs-0.1.38-7.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mhddfs-0.1.38-7.fc15

Comment 4 Fedora Update System 2011-08-10 00:43:30 UTC
mhddfs-0.1.38-7.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mhddfs-0.1.38-7.fc16

Comment 5 Fedora Update System 2011-08-10 03:22:57 UTC
Package mhddfs-0.1.38-7.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mhddfs-0.1.38-7.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/mhddfs-0.1.38-7.fc14
then log in and leave karma (feedback).

Comment 6 Ville Skyttä 2011-08-10 06:13:31 UTC
(In reply to comment #2)
> Wow one thing that is weird, I can not find the review I did for mhddfs in my
> list of bugs or by searching.

Googling for "mhddfs review request" finds it quickly.

> I looked at the SPEC file and it seems to have been fixed. Every branch,
> master, f16, f15, f14 now has make %{?_smp_mflags}.

Although _smp_mflags should be used too, it has nothing to do with $RPM_OPT_FLAGS, and in fact, 0.1.38-7 is still not built with $RPM_OPT_FLAGS.  A proper fix would look something like this:

Patch Makefile to honor user CFLAGS instead of overwriting them and send the patch upstream:

-CFLAGS	=	-Wall $(shell pkg-config fuse --cflags) \
+CFLAGS	+=	-Wall $(shell pkg-config fuse --cflags) \

...and apply the patch in the specfile, and invoke make like:

CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags}

Comment 7 Jameson 2011-08-10 13:11:00 UTC
Should I be seeing more on these lines?

gcc -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse   -DFUSE_USE_VERSION=26 -MMD -c src/flist.c -o obj/flist.o
gcc -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse   -DFUSE_USE_VERSION=26 -MMD -c src/usage.c -o obj/usage.o
gcc -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse   -DFUSE_USE_VERSION=26 -MMD -c src/tools.c -o obj/tools.o
gcc -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse   -DFUSE_USE_VERSION=26 -MMD -c src/main.c -o obj/main.o
gcc -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse   -DFUSE_USE_VERSION=26 -MMD -c src/debug.c -o obj/debug.o
gcc -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse   -DFUSE_USE_VERSION=26 -MMD -c src/parse_options.c -o obj/parse_options.o
gcc -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse   -DFUSE_USE_VERSION=26 -MMD obj/flist.o obj/usage.o obj/tools.o obj/main.o obj/debug.o obj/parse_options.o -o mhddfs -pthread -L/lib64 -lfuse -lrt -ldl 


I tried the patch you recommended, but most of his gcc lines in the make file don't mention CFLAGS, either.  Thanks.

Comment 8 Nathan Owe 2011-08-11 02:07:37 UTC
Even using sed would work 

sed -i 's|CFLAGS	=	-Wall $(shell pkg-config fuse --cflags|CFLAGS	=	-O2 -Wall $(shell pkg-config fuse --cflags|g' Makefile

 Here is the a patch file that will work: 
http://ndowens.fedorapeople.org/mhddfs-0.1.38-Makefile-cflags.patch
So in the %prep area add 
%patch0 -p0 -b .makefile-cflags

Of course you will need to a comment above the patch to explain why the patch is needed and also send the patch upstream through their bug tracker if they have one and if you use the bug tracker to submit the patch to upstream include the link to the bug in a comment above the patch. If there is no bug tracker and only email say that it was sent through email on whatever the date is that was sent.

Comment 9 Nathan Owe 2011-08-11 02:08:15 UTC
I would use the patch so upstream can use it

Comment 10 Jameson 2011-08-12 16:17:27 UTC
Ok.  I've made a patch, and ran a build with it in master.  Can someone verify that it is working, before I start pushing it into other branches?  Thanks.

Comment 11 Nathan Owe 2011-08-13 03:46:45 UTC
The patch included doesn't work. The one I have included does.  This is what the compile process shows currently:
 gcc -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse   -DFUSE_USE_VERSION=26 -MMD -c src/flist.c -o obj/flist.o

With the one I included it does
 gcc -O2 -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse   -DFUSE_USE_VERSION=26 -MMD -c src/flist.c -o obj/flist.o

Comment 12 Nathan Owe 2011-08-13 03:53:05 UTC
Though some input from Ville would be nice, looking at /var/lib/rpm/macros %{optflags} value is -O2 so that is why I made it only add -O2 if my patch is going to be in question.

Comment 13 Nathan Owe 2011-08-13 04:41:16 UTC
I redone my patch, the link http://ndowens.fedorapeople.org/mhddfs-0.1.38-Makefile-cflags.patch is my patch, I did CFLAGS += ${RPM_OPT_FLAGS}. I tested it and it does seem to add the optflags required to the one in the Makefile

Comment 14 Jameson 2011-08-13 04:52:22 UTC
But patching $RPM_OPT_FLAGS can't be passed to upstream.

Comment 15 Nathan Owe 2011-08-14 00:58:16 UTC
The patch I have created may not need to go upstream since I would believe to be only Fedora specific. According to the Packaging Guidelines:

Fedora-specific (or rejected upstream) patches

It may be that some patches truly are Fedora-specific; in that case, say so:

# This patch is temporary until we land the long term System.loadLibrary fix in OpenJDK
Patch0: jna-jni-path.patch

So I would probably put something like:
#This patch is temporary until the CFLAGS can be overridden through build flags
%{name}-%{version}-Makefile-cflags.patch

Comment 16 Ville Skyttä 2011-08-15 06:22:13 UTC
The recipe I posted in comment 6 does work, but you didn't quite follow it closely enough :)

This does not do the trick (it's how it is in the master branch at the moment):

    CFLAGS="$RPM_OPT_FLAGS"
    make %{?_smp_mflags}

Any one of these three will work:

    CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags}

    CFLAGS="$RPM_OPT_FLAGS" \
    make %{?_smp_mflags}

    export CFLAGS="$RPM_OPT_FLAGS"
    make %{?_smp_mflags}

Comment 17 Fedora Update System 2011-08-15 15:25:43 UTC
mhddfs-0.1.38-9.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mhddfs-0.1.38-9.fc16

Comment 18 Fedora Update System 2011-08-15 15:26:55 UTC
mhddfs-0.1.38-9.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mhddfs-0.1.38-9.fc15

Comment 19 Fedora Update System 2011-08-15 15:28:02 UTC
mhddfs-0.1.38-9.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mhddfs-0.1.38-9.fc14

Comment 20 Fedora Update System 2011-08-15 20:26:34 UTC
Package mhddfs-0.1.38-9.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mhddfs-0.1.38-9.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/mhddfs-0.1.38-9.fc16
then log in and leave karma (feedback).

Comment 21 Fedora Update System 2011-08-23 20:27:47 UTC
mhddfs-0.1.38-9.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2011-08-26 18:57:59 UTC
mhddfs-0.1.38-9.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2011-08-26 19:09:05 UTC
mhddfs-0.1.38-9.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.