summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2005-07-14 19:02:57 +0000
committerRoy Marples <uberlord@gentoo.org>2005-07-14 19:02:57 +0000
commit4622fa8f083cd4f2aae73809c5264ccbfc50120e (patch)
tree8dd072d47ab25bc89662ccd6018937ac96d9eebe /net-misc/pump
parent(#99001) Parallel build broken. (diff)
downloadhistorical-4622fa8f083cd4f2aae73809c5264ccbfc50120e.tar.gz
historical-4622fa8f083cd4f2aae73809c5264ccbfc50120e.tar.bz2
historical-4622fa8f083cd4f2aae73809c5264ccbfc50120e.zip
Fixed --keep-up. Needs to be used when starting instead of releasing now.
Package-Manager: portage-2.0.51.22-r1
Diffstat (limited to 'net-misc/pump')
-rw-r--r--net-misc/pump/ChangeLog9
-rw-r--r--net-misc/pump/files/digest-pump-0.8.21-r6 (renamed from net-misc/pump/files/digest-pump-0.8.21-r5)0
-rw-r--r--net-misc/pump/files/pump-0.8.21-gentoo.diff180
-rw-r--r--net-misc/pump/pump-0.8.21-r6.ebuild (renamed from net-misc/pump/pump-0.8.21-r5.ebuild)4
4 files changed, 93 insertions, 100 deletions
diff --git a/net-misc/pump/ChangeLog b/net-misc/pump/ChangeLog
index 2c23a8831934..3a17d0bc4cea 100644
--- a/net-misc/pump/ChangeLog
+++ b/net-misc/pump/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/pump
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/pump/ChangeLog,v 1.17 2005/07/14 16:23:18 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/pump/ChangeLog,v 1.18 2005/07/14 19:02:56 uberlord Exp $
+
+*pump-0.8.21-r6 (14 Jul 2005)
+
+ 14 Jul 2005; Roy Marples <uberlord@gentoo.org>
+ files/pump-0.8.21-gentoo.diff, -pump-0.8.21-r5.ebuild,
+ +pump-0.8.21-r6.ebuild:
+ Fixed --keep-up. Needs to be used when starting instead of releasing now.
*pump-0.8.21-r5 (14 Jul 2005)
diff --git a/net-misc/pump/files/digest-pump-0.8.21-r5 b/net-misc/pump/files/digest-pump-0.8.21-r6
index 0a9f7d804d9f..0a9f7d804d9f 100644
--- a/net-misc/pump/files/digest-pump-0.8.21-r5
+++ b/net-misc/pump/files/digest-pump-0.8.21-r6
diff --git a/net-misc/pump/files/pump-0.8.21-gentoo.diff b/net-misc/pump/files/pump-0.8.21-gentoo.diff
index 84999e9af31c..b6affe586a3b 100644
--- a/net-misc/pump/files/pump-0.8.21-gentoo.diff
+++ b/net-misc/pump/files/pump-0.8.21-gentoo.diff
@@ -1,6 +1,6 @@
-diff -r -U 0 pump-0.8.21/config.c pump-0.8.21-r5/config.c
---- pump-0.8.21/config.c 2005-07-14 15:18:08.000000000 +0100
-+++ pump-0.8.21-r5/config.c 2005-07-14 15:13:49.000000000 +0100
+diff -U 0 -r pump-0.8.21/config.c pump-0.8.21-r6/config.c
+--- pump-0.8.21/config.c 2005-07-14 19:26:30.000000000 +0100
++++ pump-0.8.21-r6/config.c 2005-07-14 18:49:34.000000000 +0100
@@ -158 +158,18 @@
- } else if (!strcmp(start, "domainsearch")) {
+ } else if (!strcmp(start, "routemetric")) {
@@ -68,10 +68,9 @@ diff -r -U 0 pump-0.8.21/config.c pump-0.8.21-r5/config.c
- return 1;
- }
-
-Only in pump-0.8.21: debian
-diff -r -U 0 pump-0.8.21/dhcp.c pump-0.8.21-r5/dhcp.c
---- pump-0.8.21/dhcp.c 2005-07-14 15:18:08.000000000 +0100
-+++ pump-0.8.21-r5/dhcp.c 2005-07-14 11:58:49.000000000 +0100
+diff -U 0 -r pump-0.8.21/dhcp.c pump-0.8.21-r6/dhcp.c
+--- pump-0.8.21/dhcp.c 2005-07-14 19:26:30.000000000 +0100
++++ pump-0.8.21-r6/dhcp.c 2005-07-14 19:12:34.000000000 +0100
@@ -205,0 +206 @@
+ struct sockaddr_in * addrp;
@@ -212,2 +212,0 @@
@@ -175,9 +174,12 @@ diff -r -U 0 pump-0.8.21/dhcp.c pump-0.8.21-r5/dhcp.c
+ syslog(LOG_ERR, "failed to set default route: %s", strerror(errno));
+ return -1;
+ }
-diff -r -U 0 pump-0.8.21/pump.8 pump-0.8.21-r5/pump.8
---- pump-0.8.21/pump.8 2005-07-14 15:18:08.000000000 +0100
-+++ pump-0.8.21-r5/pump.8 2005-07-14 15:10:58.000000000 +0100
+@@ -1435 +1464 @@
+- pumpDhcpClassRun(device, flags, reqLease, reqHostname, NULL, intf,
++ return pumpDhcpClassRun(device, flags, reqLease, reqHostname, NULL, intf,
+diff -U 0 -r pump-0.8.21/pump.8 pump-0.8.21-r6/pump.8
+--- pump-0.8.21/pump.8 2005-07-14 19:26:30.000000000 +0100
++++ pump-0.8.21-r6/pump.8 2005-07-14 18:49:34.000000000 +0100
@@ -2,0 +3 @@
+.\" July 2005: Updated by Roy Marples <uberlord@gentoo.org>
@@ -31,0 +33,2 @@
@@ -242,12 +244,10 @@ diff -r -U 0 pump-0.8.21/pump.8 pump-0.8.21-r5/pump.8
+Lower metrics take a higher priority.
+
+.TP
-diff -r -U 0 pump-0.8.21/pump.c pump-0.8.21-r5/pump.c
---- pump-0.8.21/pump.c 2005-07-14 15:18:08.000000000 +0100
-+++ pump-0.8.21-r5/pump.c 2005-07-14 15:07:26.000000000 +0100
-@@ -82,0 +83 @@
-+ int keepUp;
-@@ -100,111 +101,2 @@
+diff -U 0 -r pump-0.8.21/pump.c pump-0.8.21-r6/pump.c
+--- pump-0.8.21/pump.c 2005-07-14 19:26:30.000000000 +0100
++++ pump-0.8.21-r6/pump.c 2005-07-14 19:41:33.000000000 +0100
+@@ -100,111 +100,2 @@
-char * readSearchPath(void) {
- int fd;
- struct stat sb;
@@ -361,10 +361,13 @@ diff -r -U 0 pump-0.8.21/pump.c pump-0.8.21-r5/pump.c
- struct pumpOverrideInfo * override) {
+void setupDomain(struct pumpNetIntf * intf) {
+ struct pumpOverrideInfo *o = &intf->override;
-@@ -214 +106 @@
+@@ -214 +105 @@
- if (override->flags & OVERRIDE_FLAG_NONISDOMAIN)
+ if (o->flags & OVERRIDE_FLAG_NONISDOMAIN)
-@@ -242,7 +134,5 @@
+@@ -234 +125 @@
+- if (setdomainname(intf->domain, strlen(intf->domain))) {
++ if (setdomainname(intf->nisDomain, strlen(intf->nisDomain))) {
+@@ -242,7 +133,5 @@
-void setupDns(struct pumpNetIntf * intf, struct pumpOverrideInfo * override) {
- char * hn, * dn = NULL;
- struct hostent * he;
@@ -377,14 +380,14 @@ diff -r -U 0 pump-0.8.21/pump.c pump-0.8.21-r5/pump.c
+ FILE * f;
+ char resolv[1024];
+ int i;
-@@ -250,2 +140,4 @@
+@@ -250,2 +139,4 @@
- if (override->searchPath[0]) {
- createResolvConf(intf, override, override->searchPath);
+ sprintf(resolv, "%s/resolv.conf", o->etcDir);
+ f = fopen(resolv, "w");
+ if (!f) {
+ syslog(LOG_ERR, "cannot create %s: %s", resolv, strerror(errno));
-@@ -254,22 +146,5 @@
+@@ -254,22 +145,5 @@
-
- if (intf->set & PUMP_NETINFO_HAS_DNS) {
- if (!(intf->set & PUMP_NETINFO_HAS_DOMAIN)) {
@@ -412,19 +415,19 @@ diff -r -U 0 pump-0.8.21/pump.c pump-0.8.21-r5/pump.c
+ if (*domain) {
+ if (strchr(domain, ' ')) {
+ fprintf(f, "search %s\n", domain);
-@@ -277 +152 @@
+@@ -277 +151 @@
- dn = intf->domain;
+ fprintf(f, "domain %s\n", domain);
-@@ -278,0 +154 @@
+@@ -278,0 +153 @@
+ }
-@@ -280 +156,2 @@
+@@ -280 +155,2 @@
- createResolvConf(intf, override, dn);
+ for (i = 0; i < intf->numDns; i++) {
+ fprintf(f, "nameserver %s\n", inet_ntoa(intf->dnsServers[i]));
-@@ -281,0 +159,2 @@
+@@ -281,0 +158,2 @@
+
+ fclose(f);
-@@ -284,3 +163,4 @@
+@@ -284,3 +162,4 @@
-void unsetupDns(struct pumpNetIntf * intf, struct pumpOverrideInfo * override) {
- struct stat buf;
- char *arg;
@@ -432,19 +435,19 @@ diff -r -U 0 pump-0.8.21/pump.c pump-0.8.21-r5/pump.c
+ struct pumpOverrideInfo *o = &intf->override;
+ char * hn, * dn = NULL;
+ struct hostent * he;
-@@ -288,3 +168 @@
+@@ -288,5 +167 @@
- if (override->flags & OVERRIDE_FLAG_NODNS)
- return;
- if (override->flags & OVERRIDE_FLAG_NORESOLVCONF)
-+ if (o->flags & OVERRIDE_FLAG_NODNS)
-@@ -292,4 +170,2 @@
-- if (stat("/sbin/resolvconf", &buf) < 0)
- return;
+- if (stat("/sbin/resolvconf", &buf) < 0)
++ if (o->flags & OVERRIDE_FLAG_NODNS)
+@@ -294,2 +169,2 @@
- if (asprintf(&arg, "/sbin/resolvconf -d %s", intf->device) < 0) {
- syslog(LOG_ERR, "failed to release resolvconf: %s", strerror(errno));
+
+ if (!intf->set & PUMP_NETINFO_HAS_DNS)
-@@ -296,0 +173,22 @@
+@@ -296,0 +172,16 @@
+
+ if (o->searchPath[0]) {
+ dn = o->searchPath;
@@ -461,18 +464,18 @@ diff -r -U 0 pump-0.8.21/pump.c pump-0.8.21-r5/pump.c
+ } else {
+ hn = NULL;
+ }
-+ }
-+
+@@ -299,3 +190,7 @@
+- if (system(arg) != 0)
+- syslog(LOG_ERR, "resolvconf -d %s failed", intf->device);
+- free(arg);
+ if (hn) {
+ dn = strchr(hn, '.');
+ if (dn)
+ dn++;
-@@ -299,3 +197 @@
-- if (system(arg) != 0)
-- syslog(LOG_ERR, "resolvconf -d %s failed", intf->device);
-- free(arg);
++ }
++
+ createResolvConf(intf, dn);
-@@ -304,8 +200,5 @@
+@@ -304,8 +199,5 @@
-static void callIfupPost(struct pumpNetIntf* intf) {
-#ifdef debian
- /* can/should we call a debian one? */
@@ -486,20 +489,20 @@ diff -r -U 0 pump-0.8.21/pump.c pump-0.8.21-r5/pump.c
+ FILE * f;
+ char ntp[1024];
+ int i;
-@@ -313,4 +206,2 @@
+@@ -313,4 +205,2 @@
- argv[0] = "/etc/sysconfig/network-scripts/ifup-post";
- snprintf(arg,64,"ifcfg-%s",intf->device);
- argv[1] = arg;
- argv[2] = NULL;
+ if (o->flags & OVERRIDE_FLAG_NONTP)
+ return;
-@@ -318,3 +209,2 @@
+@@ -318,3 +208,2 @@
- if (!(child = fork())) {
- /* send the script to init */
- if (fork()) _exit(0);
+ if (! intf->set & PUMP_NETINFO_HAS_NTPSRVS)
+ return;
-@@ -322 +212,6 @@
+@@ -322 +211,6 @@
- execvp(argv[0], argv);
+ sprintf(ntp, "%s/ntp.conf", o->etcDir);
+ f = fopen(ntp, "w");
@@ -507,36 +510,36 @@ diff -r -U 0 pump-0.8.21/pump.c pump-0.8.21-r5/pump.c
+ syslog(LOG_ERR, "cannot create %s: %s\n", ntp, strerror(errno));
+ return;
+ }
-@@ -324 +219,4 @@
+@@ -324 +218,4 @@
- syslog(LOG_ERR,"failed to run %s: %s", argv[0], strerror(errno));
+ fprintf(f, "# Generated by pump for interface %s\n", intf->device);
+ fprintf(f, "restrict default noquery notrust nomodify\n"
+ "restrict 127.0.0.1\n"
+ "driftfile /var/lib/ntp/ntp.drift\n");
-@@ -326 +224,4 @@
+@@ -326 +223,4 @@
- _exit(0);
+ for (i = 0; i < intf->numNtp; i++) {
+ fprintf(f, "restrict %s nomodify notrap noquery\n"
+ "server %s\n", inet_ntoa(intf->ntpServers[i]),
+ inet_ntoa(intf->ntpServers[i]));
-@@ -329,2 +230 @@
+@@ -329,2 +229 @@
- waitpid(child, NULL, 0);
-#endif
+ fclose(f);
-@@ -333 +233 @@
+@@ -333 +232 @@
-static void callScript(char* script,int msg,struct pumpNetIntf* intf) {
+static void callScript(struct pumpNetIntf *intf, int msg) {
-@@ -337,0 +238 @@
+@@ -337,0 +237 @@
+ char * script = intf->override.script;
-@@ -388 +288,0 @@
+@@ -388 +287,0 @@
-
-@@ -397,4 +297 @@
+@@ -397,4 +296 @@
- int i;
-
- for (i = intf->numGateways - 1; i >= 0; i--)
- pumpSetupDefaultGateway(&intf->gateways[i]);
+ pumpSetupDefaultGateway(intf);
-@@ -403,8 +300,3 @@
+@@ -403,8 +299,3 @@
- setupDns(intf, o);
- setupDomain(intf, o);
-
@@ -548,68 +551,65 @@ diff -r -U 0 pump-0.8.21/pump.c pump-0.8.21-r5/pump.c
+ setupDns(intf);
+ setupDomain(intf);
+ setupNtp(intf);
-@@ -412,2 +304 @@
+@@ -412,2 +303 @@
- unsetupDns(intf, o);
- callScript(o->script, PUMP_SCRIPT_DOWN, intf);
+ callScript(intf, PUMP_SCRIPT_NEWLEASE);
-@@ -502 +393 @@
+@@ -502 +392 @@
- killLease(intf + closest);
+ callScript(intf + closest, PUMP_SCRIPT_DOWN);
-@@ -504 +395 @@
+@@ -504 +394 @@
- killLease(intf + closest);
+ callScript(intf + closest, PUMP_SCRIPT_DOWN);
-@@ -511,3 +402 @@
+@@ -511,3 +401 @@
- callScript(intf[closest].override.script,
- PUMP_SCRIPT_RENEWAL, &intf[closest]);
- callIfupPost(&intf[closest]);
+ callScript(&intf[closest], PUMP_SCRIPT_RENEWAL);
-@@ -576 +465 @@
+@@ -576 +464 @@
- killLease(intf + i);
+ callScript(intf + i, PUMP_SCRIPT_DOWN);
-@@ -614,3 +503 @@
+@@ -614,3 +502 @@
- callScript(intf[i].override.script,
- PUMP_SCRIPT_RENEWAL, intf + i);
- callIfupPost(intf + i);
+ callScript(intf + 1, PUMP_SCRIPT_RENEWAL);
-@@ -626,0 +514,2 @@
-+ if (cmd.u.stop.keepUp)
-+ intf[i].override.flags |= OVERRIDE_FLAG_KEEPUP;
-@@ -628 +517 @@
+@@ -628 +514 @@
- killLease(intf + i);
+ callScript(intf + i, PUMP_SCRIPT_DOWN);
-@@ -922 +810,0 @@
-- int flags = 0;
-@@ -928 +816 @@
+@@ -844 +729,0 @@
+- printf("\tGateway: %s\n", inet_ntoa(i.gateways[0]));
+@@ -928 +813 @@
- int nogateway = 0, nobootp = 0;
+ int nogateway = 0, nobootp = 0, nontp = 0;
-@@ -930 +818,2 @@
+@@ -930 +815,2 @@
- int noresolvconf = 0;
+ int routeMetric = 0;
+ int keepUp = 0;
-@@ -933,0 +823,2 @@
+@@ -933,0 +820,2 @@
+ char * etcDir = "/etc";
+ char * searchPath = NULL;
-@@ -939,0 +831,2 @@
+@@ -939,0 +828,2 @@
+ { "etc-dir", 'e', POPT_ARG_STRING, &etcDir, 0,
+ N_("Directory to store resolv.conf (normally /etc)") },
-@@ -944,0 +838,2 @@
+@@ -944,0 +835,2 @@
+ { "keep-up", 'u', POPT_ARG_NONE, &keepUp, 0,
+ N_("Keep the interface up when releasing it") },
-@@ -957 +852,3 @@
+@@ -957 +849,3 @@
- { "verbose", 'v', POPT_ARG_NONE, &verbose, 0,
+ { "route-metric", 'm', POPT_ARG_INT, &routeMetric, 0,
+ N_("Metric applied to routes (normally 0)"), N_("(metric)") },
+ { "verbose", 'v', POPT_ARG_NONE, &verbose, 0,
-@@ -964,0 +862,2 @@
+@@ -964,0 +859,2 @@
+ { "no-ntp", '\0', POPT_ARG_NONE, &nontp, 0,
+ N_("Don't update ntp.conf"), NULL },
-@@ -967,2 +865,0 @@
+@@ -967,2 +862,0 @@
- { "no-resolvconf", '\0', POPT_ARG_NONE, &noresolvconf, 0,
- N_("Don't set up resolvconf"), NULL },
-@@ -970,0 +868,2 @@
+@@ -970,0 +865,2 @@
+ { "search-path", 'p', POPT_ARG_STRING, &searchPath, 0,
+ N_("Use this DNS search path instead of the supplied one"), NULL },
-@@ -1016,0 +916,10 @@
+@@ -1016,0 +913,10 @@
+ if (etcDir && strlen(etcDir) + 12 > sizeof(overrides->etcDir)) {
+ fprintf(stderr, _("%s: --etc-dir argument is to long\n"), PROGNAME);
+ return 1;
@@ -620,41 +620,27 @@ diff -r -U 0 pump-0.8.21/pump.c pump-0.8.21-r5/pump.c
+ return 1;
+ }
+
-@@ -1030,7 +938,0 @@
-- if (test)
-- flags = PUMP_FLAG_NODAEMON | PUMP_FLAG_NOCONFIG;
-- if (winId)
-- flags |= PUMP_FLAG_WINCLIENTID;
-- if (lookupHostname)
-- flags |= PUMP_FLAG_FORCEHNLOOKUP;
--
-@@ -1047,0 +950 @@
-+ cmd.u.stop.keepUp = keepUp;
-@@ -1053 +955,0 @@
-- cmd.u.start.flags = flags;
-@@ -1065,0 +968,8 @@
-+ if (etcDir)
-+ strcpy(o->etcDir, etcDir);
-+ if (test)
-+ o->flags = PUMP_FLAG_NODAEMON | PUMP_FLAG_NOCONFIG;
-+ if (winId)
-+ o->flags |= PUMP_FLAG_WINCLIENTID;
-+ if (lookupHostname)
-+ o->flags |= PUMP_FLAG_FORCEHNLOOKUP;
-@@ -1071,0 +982,2 @@
+@@ -1036 +942 @@
+-
++
+@@ -1071,0 +978,2 @@
+ if (nontp)
+ o->flags |= OVERRIDE_FLAG_NONTP;
-@@ -1076,0 +989 @@
+@@ -1076,0 +985 @@
+ OVERRIDE_FLAG_NONTP |
-@@ -1078,2 +991,3 @@
+@@ -1078,2 +987,7 @@
- if (noresolvconf)
- o->flags |= OVERRIDE_FLAG_NORESOLVCONF;
++ if (keepUp)
++ o->flags |= OVERRIDE_FLAG_KEEPUP;
+ o->routeMetric = routeMetric;
++ if (etcDir)
++ strcpy(o->etcDir, etcDir);
+ if (searchPath)
+ strcpy(o->searchPath, searchPath);
-diff -r -U 0 pump-0.8.21/pump.h pump-0.8.21-r5/pump.h
---- pump-0.8.21/pump.h 2005-07-14 15:18:08.000000000 +0100
-+++ pump-0.8.21-r5/pump.h 2005-07-14 11:54:32.000000000 +0100
+diff -U 0 -r pump-0.8.21/pump.h pump-0.8.21-r6/pump.h
+--- pump-0.8.21/pump.h 2005-07-14 19:26:30.000000000 +0100
++++ pump-0.8.21-r6/pump.h 2005-07-14 18:49:34.000000000 +0100
@@ -57 +57,3 @@
-#define OVERRIDE_FLAG_NORESOLVCONF (1 << 5)
+/* #define OVERRIDE_FLAG_NORESOLVCONF (1 << 5) */
diff --git a/net-misc/pump/pump-0.8.21-r5.ebuild b/net-misc/pump/pump-0.8.21-r6.ebuild
index 2175f048f58f..6889e561eee9 100644
--- a/net-misc/pump/pump-0.8.21-r5.ebuild
+++ b/net-misc/pump/pump-0.8.21-r6.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/pump/pump-0.8.21-r5.ebuild,v 1.1 2005/07/14 16:23:18 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/pump/pump-0.8.21-r6.ebuild,v 1.1 2005/07/14 19:02:57 uberlord Exp $
inherit eutils
@@ -37,7 +37,7 @@ src_unpack() {
}
src_compile() {
- make pump DEB_CFLAGS="-fPIC" || die
+ make pump || die
}
src_install() {