* [Buildroot] Problem with building sudo
@ 2006-12-08 21:32 Boris Itkis
2006-12-15 15:10 ` Bernhard Fischer
0 siblings, 1 reply; 6+ messages in thread
From: Boris Itkis @ 2006-12-08 21:32 UTC (permalink / raw)
To: buildroot
sudu.mk has a problem for building:
$(TARGET_DIR)/usr/bin/sudo
it echo's the command to install sudu instead of running it.
It generally does not stop compile because on distributions like fedora
because "touch -c" has a exit code of 0 even if the file does no exist.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Problem with building sudo
2006-12-08 21:32 [Buildroot] Problem with building sudo Boris Itkis
@ 2006-12-15 15:10 ` Bernhard Fischer
2006-12-15 15:29 ` Bernhard Fischer
0 siblings, 1 reply; 6+ messages in thread
From: Bernhard Fischer @ 2006-12-15 15:10 UTC (permalink / raw)
To: buildroot
On Fri, Dec 08, 2006 at 01:32:35PM -0800, Boris Itkis (Linux) wrote:
>sudu.mk has a problem for building:
>
>$(TARGET_DIR)/usr/bin/sudo
>
>it echo's the command to install sudu instead of running it.
I'll look into this.
>
>It generally does not stop compile because on distributions like fedora
>because "touch -c" has a exit code of 0 even if the file does no exist.
That's a bug.
Point them to
http://www.opengroup.org/onlinepubs/009695399/utilities/touch.html#tag_04_143_18
which reads
"
At least one historical implementation of touch incremented the exit
code if -c was specified and the file did not exist. This volume of IEEE
Std 1003.1-2001 requires exit status zero if no errors occur.
"
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Problem with building sudo
2006-12-15 15:10 ` Bernhard Fischer
@ 2006-12-15 15:29 ` Bernhard Fischer
2006-12-15 18:14 ` Boris Itkis
0 siblings, 1 reply; 6+ messages in thread
From: Bernhard Fischer @ 2006-12-15 15:29 UTC (permalink / raw)
To: buildroot
On Fri, Dec 15, 2006 at 04:10:39PM +0100, Bernhard Fischer wrote:
>On Fri, Dec 08, 2006 at 01:32:35PM -0800, Boris Itkis (Linux) wrote:
>>sudu.mk has a problem for building:
>>
>>$(TARGET_DIR)/usr/bin/sudo
>>
>>it echo's the command to install sudu instead of running it.
>
>I'll look into this.
Can you update and retry? The installation is done via fakeroot, sudo
didn't depend on fakeroot so may not be built for you, depending on your
config.
>>
>>It generally does not stop compile because on distributions like fedora
>>because "touch -c" has a exit code of 0 even if the file does no exist.
>
>That's a bug.
Nah, it's of course not. Not exiting with ACK would have been.
Note to self: the character '0' denotes 0, not 1 ;)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Problem with building sudo
2006-12-15 15:29 ` Bernhard Fischer
@ 2006-12-15 18:14 ` Boris Itkis
2006-12-20 18:28 ` Bernhard Fischer
0 siblings, 1 reply; 6+ messages in thread
From: Boris Itkis @ 2006-12-15 18:14 UTC (permalink / raw)
To: buildroot
Bernhard Fischer wrote:
> On Fri, Dec 15, 2006 at 04:10:39PM +0100, Bernhard Fischer wrote:
>
>> On Fri, Dec 08, 2006 at 01:32:35PM -0800, Boris Itkis (Linux) wrote:
>>
>>> sudu.mk has a problem for building:
>>>
>>> $(TARGET_DIR)/usr/bin/sudo
>>>
>>> it echo's the command to install sudu instead of running it.
>>>
>> I'll look into this.
>>
>
> Can you update and retry? The installation is done via fakeroot, sudo
> didn't depend on fakeroot so may not be built for you, depending on your
> config.
>
>
The Part I am Refering to is:
$(TARGET_DIR)/usr/bin/sudo: $(SUDO_DIR)/sudo
# Use fakeroot to pretend to do 'make install' as root
echo "$(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR="$(TARGET_DIR)" -C $(SUDO_DIR) install" \
> $(STAGING_DIR)/.fakeroot.sudo
touch -c $(TARGET_DIR)/usr/bin/sudo
If you execute ${STAGING_DIR)/.fakeroot.sudo it does the installation
correctly.
May I suggest that you change:
echo "$(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR="$(TARGET_DIR)" -C $(SUDO_DIR) install" \
> $(STAGING_DIR)/.fakeroot.sudo
to:
$(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR="$(TARGET_DIR)" -C $(SUDO_DIR) install \
> $(STAGING_DIR)/.fakeroot.sudo
I believe that should fix the problem of not automatically installing sudo:
>>> It generally does not stop compile because on distributions like fedora
>>> because "touch -c" has a exit code of 0 even if the file does no exist.
>>>
>> That's a bug.
>>
>
> Nah, it's of course not. Not exiting with ACK would have been.
> Note to self: the character '0' denotes 0, not 1 ;)
>
>
>
This is or is not a bug depending on your perspective. If one just
wishes to display to the user that there is a problem and possibly stop
compilation then it's not a bug. If one wants to always stop if the file
does not exist then it is a bug.
If one believes this is a bug then may I suggest that "touch -c" be
changed to "test -f" or add a "test -f" line after the "touch -c" line.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Problem with building sudo
2006-12-15 18:14 ` Boris Itkis
@ 2006-12-20 18:28 ` Bernhard Fischer
2006-12-20 22:04 ` Boris Itkis
0 siblings, 1 reply; 6+ messages in thread
From: Bernhard Fischer @ 2006-12-20 18:28 UTC (permalink / raw)
To: buildroot
On Fri, Dec 15, 2006 at 10:14:27AM -0800, Boris Itkis (Linux) wrote:
>Bernhard Fischer wrote:
>>On Fri, Dec 15, 2006 at 04:10:39PM +0100, Bernhard Fischer wrote:
>>
>>>On Fri, Dec 08, 2006 at 01:32:35PM -0800, Boris Itkis (Linux) wrote:
>>>
>>>>sudu.mk has a problem for building:
>>>>
>>>>$(TARGET_DIR)/usr/bin/sudo
>>>>
>>>>it echo's the command to install sudu instead of running it.
>>>>
>>>I'll look into this.
>>>
>>
>>Can you update and retry? The installation is done via fakeroot, sudo
>>didn't depend on fakeroot so may not be built for you, depending on your
>>config.
>>
>>
>The Part I am Refering to is:
>
>$(TARGET_DIR)/usr/bin/sudo: $(SUDO_DIR)/sudo
> # Use fakeroot to pretend to do 'make install' as root
> echo "$(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR="$(TARGET_DIR)" -C
> $(SUDO_DIR) install" \
> > $(STAGING_DIR)/.fakeroot.sudo
> touch -c $(TARGET_DIR)/usr/bin/sudo
>
>If you execute ${STAGING_DIR)/.fakeroot.sudo it does the installation
>correctly.
>
>May I suggest that you change:
>
> echo "$(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR="$(TARGET_DIR)" -C
> $(SUDO_DIR) install" \
> > $(STAGING_DIR)/.fakeroot.sudo
>
>to:
>
> $(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR="$(TARGET_DIR)" -C
> $(SUDO_DIR) install \
> > $(STAGING_DIR)/.fakeroot.sudo
>
>I believe that should fix the problem of not automatically installing sudo:
what does cat .fakeroot.sudo say if you output stdout of that make
install into it?
Could it be that what you really need is quoting the echoed '"'?
echo "$(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=\"$(TARGET_DIR)\" -C
$(SUDO_DIR) install" > $(STAGING_DIR)/.fakeroot.sudo
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] Problem with building sudo
2006-12-20 18:28 ` Bernhard Fischer
@ 2006-12-20 22:04 ` Boris Itkis
0 siblings, 0 replies; 6+ messages in thread
From: Boris Itkis @ 2006-12-20 22:04 UTC (permalink / raw)
To: buildroot
Bernhard Fischer wrote:
> On Fri, Dec 15, 2006 at 10:14:27AM -0800, Boris Itkis (Linux) wrote:
>
>> Bernhard Fischer wrote:
>>
>>> On Fri, Dec 15, 2006 at 04:10:39PM +0100, Bernhard Fischer wrote:
>>>
>>>
>>>> On Fri, Dec 08, 2006 at 01:32:35PM -0800, Boris Itkis (Linux) wrote:
>>>>
>>>>
>>>>> sudu.mk has a problem for building:
>>>>>
>>>>> $(TARGET_DIR)/usr/bin/sudo
>>>>>
>>>>> it echo's the command to install sudu instead of running it.
>>>>>
>>>>>
>>>> I'll look into this.
>>>>
>>>>
>>> Can you update and retry? The installation is done via fakeroot, sudo
>>> didn't depend on fakeroot so may not be built for you, depending on your
>>> config.
>>>
>>>
>>>
>> The Part I am Refering to is:
>>
>> $(TARGET_DIR)/usr/bin/sudo: $(SUDO_DIR)/sudo
>> # Use fakeroot to pretend to do 'make install' as root
>> echo "$(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR="$(TARGET_DIR)" -C
>> $(SUDO_DIR) install" \
>> > $(STAGING_DIR)/.fakeroot.sudo
>> touch -c $(TARGET_DIR)/usr/bin/sudo
>>
>> If you execute ${STAGING_DIR)/.fakeroot.sudo it does the installation
>> correctly.
>>
>> May I suggest that you change:
>>
>> echo "$(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR="$(TARGET_DIR)" -C
>> $(SUDO_DIR) install" \
>> > $(STAGING_DIR)/.fakeroot.sudo
>>
>> to:
>>
>> $(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR="$(TARGET_DIR)" -C
>> $(SUDO_DIR) install \
>> > $(STAGING_DIR)/.fakeroot.sudo
>>
>> I believe that should fix the problem of not automatically installing sudo:
>>
>
> what does cat .fakeroot.sudo say if you output stdout of that make
> install into it?
>
>
the consents of .fakeroot.sudo is:
make -j1
PATH=/opt/armtools/bin:/home/root/dist/arm-tool/buildroot/toolchain_build_arm/bin:/home/root/dist/arm-tool/buildroot/fakebin:/home/root/dist/bin:/usr/bin:/bin:/usr/sbin:/sbin
AR=/opt/armtools/bin/arm-linux-uclibc-ar
AS=/opt/armtools/bin/arm-linux-uclibc-as
LD=/opt/armtools/bin/arm-linux-uclibc-ld
NM=/opt/armtools/bin/arm-linux-uclibc-nm
CC=/opt/armtools/bin/arm-linux-uclibc-gcc
GCC=/opt/armtools/bin/arm-linux-uclibc-gcc
CXX=/opt/armtools/bin/arm-linux-uclibc-g++
CPP=/opt/armtools/bin/arm-linux-uclibc-cpp
RANLIB=/opt/armtools/bin/arm-linux-uclibc-ranlib
STRIP=/opt/armtools/bin/arm-linux-uclibc-strip
OBJCOPY=/opt/armtools/bin/arm-linux-uclibc-objcopy
DESTDIR=/home/root/dist/arm-tool/buildroot/build_arm/root -C
/home/root/dist/arm-tool/buildroot/build_arm/sudo-1.6.8p9 install
> Could it be that what you really need is quoting the echoed '"'?
>
> echo "$(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=\"$(TARGET_DIR)\" -C
> $(SUDO_DIR) install" > $(STAGING_DIR)/.fakeroot.sudo
>
>
>
The other option is to change the " to a ` to tiger command execution so
the command would look like:
echo `$(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR="$(TARGET_DIR)" -C
$(SUDO_DIR) install` \
> $(STAGING_DIR)/.fakeroot.sudo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-12-20 22:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-08 21:32 [Buildroot] Problem with building sudo Boris Itkis
2006-12-15 15:10 ` Bernhard Fischer
2006-12-15 15:29 ` Bernhard Fischer
2006-12-15 18:14 ` Boris Itkis
2006-12-20 18:28 ` Bernhard Fischer
2006-12-20 22:04 ` Boris Itkis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox