how to edit and build rpm sources ?

Yes, I’ve seen that already. The %clean section is optional. If it’s missing, it will be in %prep. But what happens is that the source get overwritten and so your changes get lost. When I try to rebuild rpms, I prevent rmpbuild to clean the build directory until I’m done making the patches.

On 2012-06-21 19:36, please try again wrote:
>
> robin_listas;2470401 Wrote:
>> On 2012-06-21 03:36, please try again wrote:
>>>
>>>
>>> Code:
>>> --------------------
>>>
>>> %clean
>>> rm -rf %{buildroot}
>>> --------------------
>>
>> No, it is the %prep stage. The manual says so :frowning:
>>
>>
>
> Yes, I’ve seen that already. The %clean section is optional. If it’s
> missing, it will be in %prep. But what happens is that the source get
> overwritten and so your changes get lost. When I try to rebuild rpms, I
> prevent rmpbuild to clean the build directory until I’m done making the
> patches.

I do not see how to avoid that cleaning. I commented out the rm in my
%clean section, no difference. The %prep section only does the patching, so
something else is doing the untarring.

The “–short-circuit” is used precisely to prevent it, but it is only valid
for the -bc and -bi stages, not for the needed -bc.

mmm… I haven’t tried erasing the tar :-?


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2012-06-21 03:58, Carlos E. R. wrote:
> On 2012-06-21 03:36, malcolmlewis wrote:
>
>> Hi
>> Probably why rpmbuild isn’t supported anymore? Post the changes your
>> wanting to suspend.c I’m assuming it’s 11.4 your building for?
>
> Yep.
>
> I’m modifying this function only, some printf statement (search for the
> word “step”). What I have done is copying the binary “s2disk” to place,
> without building the rpm. It works, I see the strings printed to the
> screen. I hibernated and restored five times, no crash - which is bad, I
> wanted it to crash to find where it does. If it does beyond the step 1.5
> then I don’t know where else to print.

Finally, after a week, it crashed here:



>>                 sprintf(message, "Snapshotting system - step 1.2");
>>                 printf("%s: %s
", my_name, message);
>>                 if (atomic_snapshot(snapshot_fd, &in_suspend)) {
>>                         error = errno;
>>                         break;
>>                 }
>>                 sprintf(message, "Snapshotting system - step 1.3");
>>                 printf("%s: %s
", my_name, message);



It prints step 1.2 message and it halts there. I don’t know if
atomic_snapshot() does not return, or if returns with an error which is not
reported and the kernel crashes.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)