Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Bug 4363] New: Make sure that copied linux and busybox defconfig are writable before modifying
@ 2011-10-22  3:28 bugzilla at busybox.net
  2011-10-22 12:17 ` [Buildroot] [Bug 4363] " bugzilla at busybox.net
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2011-10-22  3:28 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=4363

           Summary: Make sure that copied linux and busybox defconfig are
                    writable before modifying
           Product: buildroot
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
        AssignedTo: unassigned at buildroot.uclibc.org
        ReportedBy: d_mo1234 at yahoo.com
                CC: buildroot at uclibc.org
   Estimated Hours: 0.0


Created attachment 3661
  --> https://bugs.busybox.net/attachment.cgi?id=3661
patch file

I use buildroot in a source controlled environment, with a custom target
skeleton, custom linux defconfig, and custom busybox defconfig.  If the custom
defconfigs are not checked out, then they are read-only.  So when linux.mk and
busybox.mk copy their respective customized defconfig to output/build, they get
copied as read-only.  Then, buildroot tries to modify these files based on the
.config settings, it fails.  (You have to manually open permissions to get the
mods operations to work, and move on.)  This problem can be avoided by opening
permissions after the copy.

To this end, a patch file is attached.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 4363] Make sure that copied linux and busybox defconfig are writable before modifying
  2011-10-22  3:28 [Buildroot] [Bug 4363] New: Make sure that copied linux and busybox defconfig are writable before modifying bugzilla at busybox.net
@ 2011-10-22 12:17 ` bugzilla at busybox.net
  2011-10-22 22:48 ` bugzilla at busybox.net
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2011-10-22 12:17 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=4363

--- Comment #1 from Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> 2011-10-22 12:17:07 UTC ---
Is it required to also modify the group permission? I'd expect u+rw to be
enough. 

Moreover, can we safely assume that the read permission is already set, so that
u+w is the only thing that needs to happen?

Thirdly, the same problem is probably present for many other locations, for
example the uclibc config file, the default target skeleton (that you may want
to modify from a post-build script) etc.
To cater for your version control system (Clearcase?) all this should be fixed
as well...

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 4363] Make sure that copied linux and busybox defconfig are writable before modifying
  2011-10-22  3:28 [Buildroot] [Bug 4363] New: Make sure that copied linux and busybox defconfig are writable before modifying bugzilla at busybox.net
  2011-10-22 12:17 ` [Buildroot] [Bug 4363] " bugzilla at busybox.net
@ 2011-10-22 22:48 ` bugzilla at busybox.net
  2011-10-22 23:12 ` bugzilla at busybox.net
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2011-10-22 22:48 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=4363

--- Comment #2 from Danomi Mocelopolis <d_mo1234@yahoo.com> 2011-10-22 22:48:17 UTC ---
(In reply to comment #1)
> Is it required to also modify the group permission? I'd expect u+rw to be
> enough.

I'm okay with u+rw.

> Moreover, can we safely assume that the read permission is already set, so that
> u+w is the only thing that needs to happen?

I suppose, but why not do u+rw anyway?  I site the line that
fixes permissions after uncompressing package archives in
buildroot/package/Makefile.package.in:

    $(Q)chmod -R +rw $(@D)

But for my purposes, getting the +w would be good enough, if you feel
strongly about this.

(BTW, not sure if "+rw" is better than "u+rw".  I always specify
the u or ug.  The man for chmod leads me to believe that +rw might
open up beyond u depending on the umask setting.  Again, I'm not
picky on this point.)


> Thirdly, the same problem is probably present for many other locations, for
> example the uclibc config file, the default target skeleton (that you may want
> to modify from a post-build script) etc.
> To cater for your version control system (Clearcase?) all this should be fixed
> as well...

Actually, we're using Perforce, but I don't think that this is 
catering to Perforce in particular.  I think this would happen with 
any of the non-distributed version control systems (rcs, cvs, svn, ...).
No?

But I think you're right, that this probably effects any place
that there is a copy from a non-derived file, or a copy from
a file that wasn't untared by GENTARGETS, and a subsequent
edit of that file is attempted.  I just had to fix the ones that 
screwed my own projects, I didn't try to find other places.

So, I have made another patch that includes the changes in the
first patch, plus uclibc and target skeleton copies, plus any
other untar opts that I could find.  See what you think.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 4363] Make sure that copied linux and busybox defconfig are writable before modifying
  2011-10-22  3:28 [Buildroot] [Bug 4363] New: Make sure that copied linux and busybox defconfig are writable before modifying bugzilla at busybox.net
  2011-10-22 12:17 ` [Buildroot] [Bug 4363] " bugzilla at busybox.net
  2011-10-22 22:48 ` bugzilla at busybox.net
@ 2011-10-22 23:12 ` bugzilla at busybox.net
  2011-10-22 23:12 ` bugzilla at busybox.net
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2011-10-22 23:12 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=4363

--- Comment #3 from Danomi Mocelopolis <d_mo1234@yahoo.com> 2011-10-22 23:12:37 UTC ---
Created attachment 3685
  --> https://bugs.busybox.net/attachment.cgi?id=3685
patch file

aforementioned patch

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 4363] Make sure that copied linux and busybox defconfig are writable before modifying
  2011-10-22  3:28 [Buildroot] [Bug 4363] New: Make sure that copied linux and busybox defconfig are writable before modifying bugzilla at busybox.net
                   ` (2 preceding siblings ...)
  2011-10-22 23:12 ` bugzilla at busybox.net
@ 2011-10-22 23:12 ` bugzilla at busybox.net
  2011-10-31 13:45 ` bugzilla at busybox.net
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2011-10-22 23:12 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=4363

Danomi Mocelopolis <d_mo1234@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #3661|0                           |1
        is obsolete|                            |

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 4363] Make sure that copied linux and busybox defconfig are writable before modifying
  2011-10-22  3:28 [Buildroot] [Bug 4363] New: Make sure that copied linux and busybox defconfig are writable before modifying bugzilla at busybox.net
                   ` (3 preceding siblings ...)
  2011-10-22 23:12 ` bugzilla at busybox.net
@ 2011-10-31 13:45 ` bugzilla at busybox.net
  2011-11-01  1:29 ` bugzilla at busybox.net
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2011-10-31 13:45 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=4363

--- Comment #4 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 2011-10-31 13:45:06 UTC ---
I really don't understand why this would be necessary. Could you detail what
you mean by "If the custom defconfigs are not checked out, then they are
read-only" ?

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 4363] Make sure that copied linux and busybox defconfig are writable before modifying
  2011-10-22  3:28 [Buildroot] [Bug 4363] New: Make sure that copied linux and busybox defconfig are writable before modifying bugzilla at busybox.net
                   ` (4 preceding siblings ...)
  2011-10-31 13:45 ` bugzilla at busybox.net
@ 2011-11-01  1:29 ` bugzilla at busybox.net
  2013-11-14  0:20 ` bugzilla at busybox.net
  2014-02-09 21:23 ` bugzilla at busybox.net
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2011-11-01  1:29 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=4363

--- Comment #5 from Danomi Mocelopolis <d_mo1234@yahoo.com> 2011-11-01 01:29:08 UTC ---
(In reply to comment #4)
> I really don't understand why this would be necessary. Could you detail what
> you mean by "If the custom defconfigs are not checked out, then they are
> read-only" ?

For some version control systems, controlled files are read-only unless you
actually check the file out for modification.  Regardless, if the custom linux
or busybox defconfig is read-only (for whatever reason), then the copied file
(made by buildroot) will be read-only.  When that's the case, "sed -i" fails.

I.e., buildroot starts by copying the linux or busybox defconfig from where
ever it was set up in menuconfig to output/build/*/.config, then uses sed to
modify some of the selections according to other menuconfig settings.  If the
file comes out of the initial copy with read-only permissions, then the sed
will fail, and make will error out.

I would imagine that buildroot's Makefile.package.in does the "chmod -R +rw
$(@D)" when unpacking archives (prior to patching) for similar reasons, no?

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 4363] Make sure that copied linux and busybox defconfig are writable before modifying
  2011-10-22  3:28 [Buildroot] [Bug 4363] New: Make sure that copied linux and busybox defconfig are writable before modifying bugzilla at busybox.net
                   ` (5 preceding siblings ...)
  2011-11-01  1:29 ` bugzilla at busybox.net
@ 2013-11-14  0:20 ` bugzilla at busybox.net
  2014-02-09 21:23 ` bugzilla at busybox.net
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2013-11-14  0:20 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=4363

Thomas Petazzoni <thomas.petazzoni@free-electrons.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at buildroot.uclibc |yann.morin.1998 at free.fr
                   |.org                        |

--- Comment #6 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 2013-11-14 00:20:35 UTC ---
Yann has started working on this.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [Bug 4363] Make sure that copied linux and busybox defconfig are writable before modifying
  2011-10-22  3:28 [Buildroot] [Bug 4363] New: Make sure that copied linux and busybox defconfig are writable before modifying bugzilla at busybox.net
                   ` (6 preceding siblings ...)
  2013-11-14  0:20 ` bugzilla at busybox.net
@ 2014-02-09 21:23 ` bugzilla at busybox.net
  7 siblings, 0 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2014-02-09 21:23 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=4363

Peter Korsgaard <jacmet@uclibc.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #7 from Peter Korsgaard <jacmet@uclibc.org> 2014-02-09 21:23:35 UTC ---
Fixed by Yann in git (984524fda1f8260e258421f6676d522591f025da and parents)

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-02-09 21:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-22  3:28 [Buildroot] [Bug 4363] New: Make sure that copied linux and busybox defconfig are writable before modifying bugzilla at busybox.net
2011-10-22 12:17 ` [Buildroot] [Bug 4363] " bugzilla at busybox.net
2011-10-22 22:48 ` bugzilla at busybox.net
2011-10-22 23:12 ` bugzilla at busybox.net
2011-10-22 23:12 ` bugzilla at busybox.net
2011-10-31 13:45 ` bugzilla at busybox.net
2011-11-01  1:29 ` bugzilla at busybox.net
2013-11-14  0:20 ` bugzilla at busybox.net
2014-02-09 21:23 ` bugzilla at busybox.net

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox