[Bug 249998] New: compiz.spec %prep, %setup broken
https://bugzilla.novell.com/show_bug.cgi?id=249998 Summary: compiz.spec %prep, %setup broken Product: openSUSE 10.3 Version: Alpha 1plus Platform: All OS/Version: All Status: NEW Severity: Normal Priority: P5 - None Component: X11 Applications AssignedTo: mhopf@novell.com ReportedBy: andreas.hanke@gmx-topmail.de QAContact: sndirsch@novell.com compiz doesn't build for me because it does broken things in the spec file: - It does "rm -rf %_builddir/*", which is wrong because it can result in data loss (files owned by other packages) and will fail if another user has some non-writable files there - It does "%setup -n .", which breaks the build as non-root because %setup runs chmod, which obviously fails for a root-owned directory like %_builddir/. Error message: Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.27694 + umask 022 + cd /usr/src/packages/BUILD + rm -rf /usr/src/packages/BUILD/compiz-0.3.7 /usr/src/packages/BUILD/gnome-xgl-settings-0.9 /usr/src/packages/BUILD/Mesa-6.5.2 + cd /usr/src/packages/BUILD + /usr/bin/bzip2 -dc /usr/src/packages/SOURCES/MesaLib-6.5.2.tar.bz2 + tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + /usr/bin/bzip2 -dc /usr/src/packages/SOURCES/compiz-0.3.7.tar.bz2 + tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + /usr/bin/gzip -dc /usr/src/packages/SOURCES/gnome-xgl-settings-0.9.tar.gz + tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + cd . ++ /usr/bin/id -u + '[' 1000 = 0 ']' ++ /usr/bin/id -u + '[' 1000 = 0 ']' + /bin/chmod -Rf a+rX,u+w,g-w,o-w . error: Bad exit status from /var/tmp/rpm-tmp.27694 (%prep) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.27694 (%prep) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=249998 ------- Comment #1 from andreas.hanke@gmx-topmail.de 2007-02-28 15:51 MST ------- Created an attachment (id=121692) --> (https://bugzilla.novell.com/attachment.cgi?id=121692&action=view) Fix -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=249998 ------- Comment #2 from andreas.hanke@gmx-topmail.de 2007-02-28 16:03 MST ------- I think this fix also allows you to finally add #norootforbuild. What the patch does is: - Use "-c" to let rpm create a subdir, and also let rpm delete it. This makes "rm -rf %_builddir/*" and "-D" obsolete. - Use "-n %{name}" to have a real subdir and not a fake subdir like ".". This fixes the chmod problem. - Use "-a" instead of "-b" because now we have a subdir. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=249998 mhopf@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #3 from mhopf@novell.com 2007-03-02 09:36 MST ------- Is there *any* good documentation of rpm specfiles? I'd love to see one. Those I found so far are pretty much crap... # norootforbuild works for me in the xgl package - probably because rm -rf never fails (-f). (In reply to comment #2)
- Use "-c" to let rpm create a subdir, and also let rpm delete it. This makes "rm -rf %_builddir/*" and "-D" obsolete.
Well, I don't trust rpm, so I'll still do the rm -rf myself. But only for the subdir %name. Modulo testing this looks good. Fixed in STABLE, updated on openSUSE. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=249998 ------- Comment #4 from sndirsch@novell.com 2007-03-02 09:42 MST ------- BTW, instead of "-c -n %name" you can also use "-c %name". See also http://www.rpm.org/RPM-HOWTO/build.html#PREP -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=249998 ------- Comment #5 from andreas.hanke@gmx-topmail.de 2007-03-02 19:08 MST ------- The rm -rf is really not necessary because rpm does that automatically unless -D was given. And D is not correct here because there are not multiple %setup macros (see link above) => No need to use -D => No need to do rm -rf. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=249998 ------- Comment #6 from mhopf@novell.com 2007-03-05 04:01 MST ------- (In reply to comment #5)
The rm -rf is really not necessary because rpm does that automatically unless -D was given.
As I said, I don't trust rpm ;) Anyway, we should both be happy with the new specfile. Thanks! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=249998 ------- Comment #7 from andreas.hanke@gmx-topmail.de 2007-03-05 04:07 MST ------- Yes, an extra rm -rf is no problem as long as it doesn't delete other packages' files ;-) Anyway, this report was against compiz and I've seen that you have fixed xgl instead. This is of course fine as long as compiz is not forgotten. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=249998 ------- Comment #8 from mhopf@novell.com 2007-03-05 04:16 MST ------- compiz has been fixed as well. It already is in openSUSE. In STABLE the fix was rejected, because someone else checked in something in the meantime. Fixed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com