Bug 7602 - Spec file permission and user-build problems
Spec file permission and user-build problems
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: tcltk (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
:
Depends On: 7537 7601
Blocks:
  Show dependency treegraph
 
Reported: 1999-12-05 12:46 EST by irwin
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-03 19:15:27 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description irwin 1999-12-05 12:46:56 EST
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 12:55:59 EST
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 02:02:59 EST
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-03 19:15:59 EST
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.