Request 158 was acted upon.
_________________________________________________________________________

         URL: https://rt.openpkg.org/id/158
      Ticket: [OpenPKG #158]
     Subject: NTP static linking
  Requestors: [EMAIL PROTECTED]
       Queue: openpkg
       Owner: Nobody
      Status: new
 Transaction: Ticket created by [EMAIL PROTECTED]
        Time: Fri Jun 13 03:32:02 2003
_________________________________________________________________________

I ran into a problem today after installing ntp on a SuSE 8.2 personal
system.  The personal version doesn't have libelf which is necessary for
this, so it won't build on the host system without rebuilding the SuSE
SRPMS from their professional system (this is fairly common with SuSE where
the professional system has full developer's libraries where the personal
doesn't which is why we typically do binary installs on the personal boxes
from builds under professional).

The attached patch against the current ntp.spec file fixes this by forcing
static linking.  It also has one fix to allow this to build on SCO
OpenServer, and adds a %config(noreplace) to the ntp.conf file which
probably shouldn't be changed after it's configured for local servers.

The OpenServer patch requires sed'' since the subst uses an escaped
newline, but then the OpenServer sed'' is pretty broken so this is one of
the first things we install.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

If the personal freedoms guaranteed by the Constitution inhibit the
government's ability to govern the people, we should look to limit those
guarantees.''
   -President Bill Clinton, August 12, 1993

--- ../../PKG/ntp.spec	2003-06-12 18:11:10.000000000 -0700
+++ ntp.spec	2003-06-12 17:58:35.000000000 -0700
@@ -33,7 +33,7 @@
 Group:        Network
 License:      BSD-style
 Version:      4.1.1b
-Release:      20030328
+Release:      20030612
 
 #   list of sources
 Source0:      ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-%{version}.tar.gz
@@ -71,8 +71,13 @@
 
 %build
     ( cd ntp-%{version}
+%if "%{_os}" == "sco_sv"
+      %{l_shtool} subst +		-e '/sys\/sio.h/s!^!#  include <stropts.h>\n!' +		ntpd/ntp_refclock.c
+%endif
       CC="%{l_cc}" -      CFLAGS="%{l_cflags -O}" +      CFLAGS="%{l_cflags -O} -static "        ./configure            --prefix=%{l_prefix}
       %{l_shtool} subst @@ -103,7 +108,7 @@
     %{l_shtool} mkdir -f -p -m 755 %{l_prefix}/var/ntp/ntpd.stat
     strip %{l_prefix}/bin/* >/dev/null 2>&1 || true
     %{l_rpmtool} files -v -ofiles -r %{l_files_std} -         '%config %{l_prefix}/etc/ntp/ntp.conf'
+         '%config(noreplace) %{l_prefix}/etc/ntp/ntp.conf'
 
 %files -f files
 

Reply via email to