Bug 35362 - SRPM patches a dynamically generated file = bad
Summary: SRPM patches a dynamically generated file = bad
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ntp
Version: 7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-04-09 16:36 UTC by andrewem
Modified: 2007-04-18 16:32 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-06-29 09:46:44 UTC
Embargoed:


Attachments (Terms of Use)

Description andrewem 2001-04-09 16:36:59 UTC
I cannot build ntp-4.0.99k-15 from the SRPM as config.h is patched after
running the configuration script.

+ patch config.h
patching file `config.h'
Hunk #1 FAILED at 466.
Hunk #2 FAILED at 808.

Ugh.  Yes, using patch is quick and easy, and works most of the time.  No,
you shouldn't use patch on dynamically generated files.

Comment 1 Pekka Savola 2001-04-14 21:06:04 UTC
I agree.

Also, I took this (detecting time.h right) up with ntp developers a month or so ago.  Should be fixed
for the next release.


Comment 2 kenneth_porter 2001-06-28 03:33:42 UTC
Meanwhile, here's a fix: The offending patch is just trying to #undef 3 constants, so instead of patching, append #undefs:

13c13
< Patch0: ntp-4.0.99j-glibc22.patch
---
> Patch0: ntp-4.0.99j-glibc22.append
53c53
< patch config.h < %PATCH0
---
> cat %PATCH0 >> config.h

Patch0 becomes:

/* append to config.h */
#undef HAVE_CLOCK_SETTIME
#undef HAVE_TIMER_CREATE
#undef HAVE_TIMER_SETTIME

BTW, bug 32803 should be marked as a duplicate of this bug. (In that bug, the patch is effectively a no-op because these syms are already undefined 
for the old glibc.)

Comment 3 Harald Hoyer 2001-08-01 07:20:18 UTC
will be in 4.0.99mrc2-4 and newer packages



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