Bug 7602 - Spec file permission and user-build problems
Summary: Spec file permission and user-build problems
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tcltk
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jens Petersen
QA Contact:
URL:
Whiteboard:
Depends On: 7537 7601
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-12-05 17:46 UTC by irwin
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-02-04 00:15:27 UTC


Attachments (Terms of Use)

Description irwin 1999-12-05 17:46:56 UTC
These general problems were found while building tcltk from the 6.1 source
on a 5.2 system.  I will attach a patch file that fixes them.

The changes:

(1) Two additional patch files are processed, see bugs 7537 and 7601.

(2) The cp, sed, and rm triplet of commands that appear a number of places
in the spec file are replaced by the sed, chmod, and mv triplet.  The old
version lead to permission errors (at least for user build) for read-only
files.  The new version avoids this problem and also preserves the
permissions of the files.

(3) defattr(-,root,root) inserted at start of each files list to preserve
permissions and set root ownership for a user build.

Comment 1 irwin 1999-12-05 17:55:59 UTC
I could not get the attachment to work for my patch file so here it is.

--- tcltk.spec_original Thu Dec  2 18:01:50 1999
+++ tcltk.spec  Sat Dec  4 09:37:56 1999
@@ -23,6 +23,8 @@
 # no patch 6
 Patch7: tix-4.1.0.6-perf.patch
 Patch8: tclX-8.0.4-jbj.patch
+Patch9: irwin_tclX.patch
+Patch10: irwin_expect.patch
 Copyright: BSD
 Group: Development/Languages
 Buildroot: /var/tmp/%{name}-root
@@ -144,6 +146,7 @@
 %patch3 -p2 -b .alpha
 %patch4 -p2 -b .glibc21
 %patch5 -p2 -b .jbj
+%patch10 -p2 -b .awi
 cd ..

 # no patch 6
@@ -154,6 +157,7 @@

 cd tclX%{tclXvers}
 %patch8 -p2 -b .wrongtclXvers
+%patch9 -p2 -b .wrongtclXldlibpath
 cd ..

 # XXX this was only needed with the IEEE patch0
@@ -307,9 +311,9 @@
 # for files in expect.files, sed the #! at the top...
 for n in `cat expect.files`; do
        if head -1 $n | grep '#!'; then
-               cp -a $n $n.in
-               sed "s|$RPM_BUILD_ROOT||" < $n.in > $n
-               rm -f $n.in
+               sed "s|$RPM_BUILD_ROOT||" < $n > $n.in
+               chmod `chmod + --verbose $n |cut -d " " -f 6` $n.in
+               mv -f $n.in $n
        fi
 done

@@ -328,9 +332,9 @@

 for n in `cat tix.files`; do
         if head -1 $n | grep '#!'; then
-                cp -a $n $n.in
-                sed "s|$RPM_BUILD_ROOT||" < $n.in > $n
-               rm -f $n.in
+               sed "s|$RPM_BUILD_ROOT||" < $n > $n.in
+               chmod `chmod + --verbose $n |cut -d " " -f 6` $n.in
+               mv -f $n.in $n
         fi
 done

@@ -349,9 +353,9 @@

 for n in `cat itcl.files`; do
         if head -1 $n | grep '#!'; then
-                cp -a $n $n.in
-                sed "s|$RPM_BUILD_ROOT||" < $n.in > $n
-               rm -f $n.in
+               sed "s|$RPM_BUILD_ROOT||" < $n > $n.in
+               chmod `chmod + --verbose $n |cut -d " " -f 6` $n.in
+               mv -f $n.in $n
         fi
 done

@@ -359,7 +363,8 @@
 # this is too annoying to watch
 set +x
 for n in *.files; do
-       mv $n $n.in
+       echo '%defattr(-,root,root)' |cat - $n > $n.in
+       rm -f $n
        sed "s|.*/usr|/usr|" < $n.in | while read file; do
            if [ -d $RPM_BUILD_ROOT/$file ]; then
                echo -n '%dir '
@@ -389,7 +394,6 @@

 %clean
 rm -rf $RPM_BUILD_ROOT
-
 %files -f tcl.files -n tcl
 %files -f tk.files -n tk
 %files -f tclx.files -n tclx

Comment 2 Aleksey Nogin 1999-12-14 07:02:59 UTC
These problems are also fixed in tcltk-8.2.2-2.rh6.1.src.rpm that I have
uploaded to contrib.

Comment 3 Elliot Lee 2000-02-04 00:15:59 UTC
Hi,

As far as the changes in the sed jobs, they are overly complex and error-prone,
but I have taken the basic idea and tried to use it in the latest tcltk package.

As for the extra patches, I think a couple of the bug reports I already closed
today address those issues.

Thanks...


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