summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2014-04-30 18:28:23 +0000
committerUlrich Müller <ulm@gentoo.org>2014-04-30 18:28:23 +0000
commit3ac546145725b1901f7ecef85afa2a7967750844 (patch)
treee383d4cf9406cc6f81a32e7ac730ebc7aae12dc2 /sys-apps/adjtime
parentUse multilib_src_*() phases. Fix missing eautoreconf deps. (diff)
downloadhistorical-3ac546145725b1901f7ecef85afa2a7967750844.tar.gz
historical-3ac546145725b1901f7ecef85afa2a7967750844.tar.bz2
historical-3ac546145725b1901f7ecef85afa2a7967750844.zip
Fix LICENSE, remove distfile from FILESDIR, add mirror and bindist restrictions, bug 441922.
Package-Manager: portage-2.2.10/cvs/Linux x86_64 Manifest-Sign-Key: 0x9433907D693FB5B8!
Diffstat (limited to 'sys-apps/adjtime')
-rw-r--r--sys-apps/adjtime/ChangeLog9
-rw-r--r--sys-apps/adjtime/Manifest21
-rw-r--r--sys-apps/adjtime/adjtime-0.4-r2.ebuild23
-rw-r--r--sys-apps/adjtime/files/adjtime.pl242
4 files changed, 37 insertions, 258 deletions
diff --git a/sys-apps/adjtime/ChangeLog b/sys-apps/adjtime/ChangeLog
index cfb9ccc031a5..60517be21a15 100644
--- a/sys-apps/adjtime/ChangeLog
+++ b/sys-apps/adjtime/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-apps/adjtime
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/adjtime/ChangeLog,v 1.6 2012/10/07 09:13:13 pacho Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/adjtime/ChangeLog,v 1.7 2014/04/30 18:28:05 ulm Exp $
+
+ 30 Apr 2014; Ulrich Müller <ulm@gentoo.org> adjtime-0.4-r2.ebuild,
+ -files/adjtime.pl:
+ Fix LICENSE, remove distfile from FILESDIR, add mirror and bindist
+ restrictions, bug 441922.
07 Oct 2012; Pacho Ramos <pacho@gentoo.org> metadata.xml:
Drop maintainer due retirement, #24135.
diff --git a/sys-apps/adjtime/Manifest b/sys-apps/adjtime/Manifest
index c6101841ab2b..a9e5d04aa41f 100644
--- a/sys-apps/adjtime/Manifest
+++ b/sys-apps/adjtime/Manifest
@@ -1,14 +1,21 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
-AUX adjtime.pl 8535 SHA256 bd8c74c1ceb595fdb9aeac6586812a85a1c8712dcd1abfaf2f0e9d838d7b6c2c SHA512 c145e06a4432dd53bc43506f3af53249d0a781479d2bb161fbed099e95fe2acba620bf369e3d244b20c06d83b1daef34bba339d65abc0b47d84ecbd238228a88 WHIRLPOOL 9c0bb4e66ef93e7ebb40de616c11b3a2acaa2ef69bbf413595b864f5b59d5e799702df59699e379e45d32bef4a5c599d85840b5ff002983afa803142d37ae93c
-EBUILD adjtime-0.4-r2.ebuild 1188 SHA256 034aefeabd37ab70aeaf4759d4b898298422c82c2aa75d6ef5bebb26df6efb90 SHA512 e48bb814daf2a5284c7c398d99b94096eb74737703287c9b5bffaa8c03aef97de43f17015a539617b050f3a6f0b7cabbdae867e9b724e37607ec2dcef0127a83 WHIRLPOOL 831ec40168636253c2efcc90feba1875ad3ef1c334c03f5555646cc4975a86b1ce025b226a2634b3116cae93e2bacf27c39b4f1d289cd613c8c54ec5eb640ba4
-MISC ChangeLog 1457 SHA256 ab978f361ef0ef4863d8027f70f845d2d5031f203c7e0f0e5025d0130fbfe19d SHA512 fd5327bfc69578c7924618ad1025658178c26e7b00e02a277110cd4957e33ab980b013a7bed281d488fc175afc41d15ccaba18fbb6422008ed629b41b9460b2a WHIRLPOOL 6fbe6c72eab4c04e2a982b95cc1e7fffb9889b29dd7ec9dc550630fb0cf20043ef2ea0c8addb04d42c1e98128f050ec96af8217491fc6fc08358490f7eb91163
+DIST adjtime.zip 2805 SHA256 64d0ffe0510ce727c3ead8bbc1e3c923a463253b375579b31040815cb6014800 SHA512 cc0f16ca19fea240300f9e0a9eddcefa07cb21f59fe4da8e7132dc75ec26ecaf7036ee6d282f8a488005b40077931e1cadc5634095aa0ff402f375bc0e83a1c0 WHIRLPOOL be5bec263c81fbbf97fb90dbe2df8351181a3c42dba00759700d71798dea93327731cc0647049781cdc0177bb943ae6b457299fe9cf32d4b77d6c88776216e16
+EBUILD adjtime-0.4-r2.ebuild 1341 SHA256 e31f8f94be7599cd45f529f3bdaa497aea2dbb3b55a1a55c621aa10520712ff8 SHA512 0f786ff66d606b55752d58ae499ceef88b475646208ce44f68fe4d9a5d02df4e43cd0e7dad294538eb4606822fb980d270fcdcd0c59977d353347c6906a2b4aa WHIRLPOOL 4e6de24470236f6682285f12d78db3fa14336d0523073f05e9eb5a391022bbe4e019ba52bd5ab6e3bff33c94402a72e8497c4976138c1b783d18388fc20eb6d4
+MISC ChangeLog 1644 SHA256 41c67a870a96e8cbadeade3ba04137098b00785da893876d342924e44ac2266d SHA512 6c7a37c9f7bfa109058a876b128f480024ab7961142d49996e122adcadacb6f1e11287f5601ce1cd931a77c1c4a4cd1e27f8495387f7505a511a05785e76e1ed WHIRLPOOL 56c07b5a34462f73bd735d60d1d98a6c6efdaecbe0a4bc983f9bb732c3278ceda4fd91aed9a71994d3df563b87a33c0bc8f73428adb7803b13b0decbf04ef8cb
MISC metadata.xml 352 SHA256 2976772d0bad45c8f3828fc49026077307c90849b31db8b13e4518d551f2e668 SHA512 f64ef8c71ced9444b8c18aa7b569c3bae35bd420d472b0602fdadf5e2078abddc7813980bed44c5840637e205a8cb9497fd83f6a66043abb3e31e7a8b0acc560 WHIRLPOOL 21496c0f1e4c7accf017479b83d044f1712e13efe5bd52bcdd33cd4c62a6455bc05bc5d7c3122b009f24eae73122b1374fa21ac834a91df41fb85fbdc80fef5f
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.19 (GNU/Linux)
+Version: GnuPG v2.0.22 (GNU/Linux)
-iEYEAREIAAYFAlBxR6oACgkQCaWpQKGI+9QX5gCfYR28C5xN0PUi4pnYv9PexoXI
-fr8An0i9z/Jvoj4PSb43xHhAz4z83VgL
-=pko8
+iQGcBAEBCAAGBQJTYUDDAAoJEJQzkH1pP7W4FxAL/3OPw4dgLtg7UhEhYC1SU5MS
+eL/NE6CtBaMxVFe75MU4zxPGBEbZgKaoUW2KUzyMo0Wu6TO6rxc96nhqRAL/YHb4
+qzzXeegYD7bz7HWQGeh3m9pTuLZCbaFMUbuRcivnXgtuMSdy0E2Uk/ZOTz6c14D7
+pfB6b+C5F1m+nFCNfQTuYpROLYSgRi7TMCPRKnaO98sPix02mK5QS6SPjjHhHhGj
+McpMpAlGRQ77nAfJkQxBk8zEk6Ya9jM6wMJuHGkGhJCjTqyilCZZbW305JpfXs9q
+xJlktqS9eb64gpTq71gEEsOd0I9P0HOC+8UJXi5brTqR3zw5GaYlwahryLLB1840
+GEpgRxhgFLkrTJIy382EmjsvY1unukGxJA8hPyywd9qdifnyXzwX7+prsTlYomb9
+XYaKO9CbqvkAOXzzoYYhI7m4m4gRHZCPvhF/6IJIs7ajRcCjtdpsGc7YiBFphyol
+UmbyicG0h8cHru/pGpYXk6JWtGHbvJaTjww6dx8zDQ==
+=ofIQ
-----END PGP SIGNATURE-----
diff --git a/sys-apps/adjtime/adjtime-0.4-r2.ebuild b/sys-apps/adjtime/adjtime-0.4-r2.ebuild
index fa214503cea2..8721d666b759 100644
--- a/sys-apps/adjtime/adjtime-0.4-r2.ebuild
+++ b/sys-apps/adjtime/adjtime-0.4-r2.ebuild
@@ -1,21 +1,30 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/adjtime/adjtime-0.4-r2.ebuild,v 1.3 2007/07/12 05:10:21 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/adjtime/adjtime-0.4-r2.ebuild,v 1.4 2014/04/30 18:28:05 ulm Exp $
-DESCRIPTION="A perl script to adjust the clock tick of the hardware clock on the system board (should work on most platforms)."
+EAPI=5
+
+DESCRIPTION="A perl script to adjust the clock tick of the hardware clock on the system board"
HOMEPAGE="http://groups.yahoo.com/group/LinkStation_General/"
+SRC_URI="http://www.gentoogeek.org/files/${PN}.zip"
-LICENSE="as-is"
+LICENSE="all-rights-reserved" #441922
SLOT="0"
KEYWORDS="ppc"
-IUSE=""
+RESTRICT="mirror bindist"
+DEPEND="app-arch/unzip"
RDEPEND="dev-lang/perl
>=net-misc/ntp-4.2"
+S="${WORKDIR}"
+
+src_prepare() {
+ sed -i -e 's:/usr/sbin/tickadj:/usr/bin/tickadj:' adjtime.pl || die
+}
+
src_install() {
- dodir /usr/sbin
- dosbin ${FILESDIR}/adjtime.pl || die
+ dosbin adjtime.pl
}
pkg_postinst() {
diff --git a/sys-apps/adjtime/files/adjtime.pl b/sys-apps/adjtime/files/adjtime.pl
deleted file mode 100644
index efbf5799a091..000000000000
--- a/sys-apps/adjtime/files/adjtime.pl
+++ /dev/null
@@ -1,242 +0,0 @@
-#! /usr/bin/perl -w
-
-# KuroBox/Linkstation Clock Calibration Program
-#
-# Sets the internal system 'tickadj' variable to
-# the optimum value, computed by comparing elapsed
-# time on the local box versus that indicated by
-# an external NTP server.
-#
-# The sample window is set to 5min by default, but
-# empirical tests indicate an interval even as low
-# as 1min gives pretty good results.
-#
-# Use as: adjtime.pl -t -s 68.12.13.56 -i 60
-# adjtime.pl -v -s 68.12.13.56 -i 60
-#
-# 2005-02-13 v0.2 don north ak6dn@mindspring.com
-# - initial version
-# 2005-02-15 v0.3 don north
-# - added error checking for missing servers, etc
-# - range limited tickadj to +/-10% per iteration
-# 2005-02-20 v0.4 don north
-# - added retry count/delay for ntp server
-
-# generic defaults
-my $VERSION = 'v0.4'; # version of code
-my $DEBUG = 0; # set to 1 for debug messages
-my $VERBOSE = 0; # set to 1 for verbose messages
-
-# specific defaults
-my $NTPSERVER = ''; # ip address of NTP server
-my $INTERVAL = 5*60; # seconds default sample interval
-my $CHECKEND = 0; # set to 1 to check final tick calibration
-my $CHECKONLY = 0; # set to 1 to only check clock, no tick update
-my $RETRYCOUNT = 8; # retry count before giving up
-my $RETRYDELAY = 5; # base retry delay, in seconds
-
-my $ERROR = 0;
-for (my $i = 0; $i <= $#ARGV; $i++) {
- if ($ARGV[$i] eq '-h') { $ERROR = 1; }
- elsif ($ARGV[$i] eq '-d') { $VERBOSE = 1; $DEBUG = 1; }
- elsif ($ARGV[$i] eq '-v') { $VERBOSE = 1; }
- elsif ($ARGV[$i] eq '-c') { $CHECKEND = 1; }
- elsif ($ARGV[$i] eq '-t') { $VERBOSE = 1; $CHECKONLY = 1; }
- elsif ($ARGV[$i] eq '-s') { $NTPSERVER = $ARGV[++$i]; }
- elsif ($ARGV[$i] eq '-i') { $INTERVAL = $ARGV[++$i]; }
- elsif ($ARGV[$i] eq '-r') { $RETRYCOUNT = $ARGV[++$i]; }
- elsif ($ARGV[$i] eq '-R') { $RETRYDELAY = $ARGV[++$i]; }
- else { $ERROR = 1; }
-}
-
-# say hello
-printf STDERR "adjtime.pl %s for Kurobox/Linkstation (perl %g)\n", $VERSION, $] if $VERBOSE;
-
-# check for correct arguments present, print usage if errors
-if ($ERROR || $INTERVAL <= 0) {
- print STDERR "Usage: $0 [options...]\n";
- print STDERR <<"EOF";
- -h help; print this message
- -d enable debug mode
- -v verbose status reporting
- -t test only; check clock calibration, no update
- -c check clock calibration after setting tickadj
- -s IPADDR ip address of NTP server [use /etc/ntp.conf]
- -i DELAY sample interval, seconds [$INTERVAL]
- -r COUNT NTP server retry count [$RETRYCOUNT]
- -R DELAY NTP server query retry delay, seconds [$RETRYDELAY]
-EOF
- # exit if errors...
- die "Aborted due to command line errors.\n";
-}
-
-# globals
-my $DELTA = 0; # actual time slept, seconds
-my $OFFSET = 0; # clock error, seconds
-
-# --------------------------------------------------------------------------------
-
-# get an ntp time server from the ntp config file in none specified
-
-unless ($NTPSERVER) {
- if (open(INP, "< /etc/ntp.conf")) {
- while (my $line = scalar(<INP>)) {
- if ($line =~ m/^\s*server\s+(\S+)/i) {
- $NTPSERVER = $1;
- last;
- }
- }
- close(INP);
- }
-}
-printf STDERR "Using NTP server at '%s'\n", $NTPSERVER if $VERBOSE;
-
-# --------------------------------------------------------------------------------
-
-# get the calibration factors by syncing the clock an hour apart
-#
-# ntpdate -b server; sleep 3600; ntpdate -b server
-# 13 Sep 14:55:31 ntpdate[8507]: step time server 192.168.1.1 offset 0.190378 sec
-# 13 Sep 15:55:28 ntpdate[8509]: step time server 192.168.1.1 offset -3.261289 sec
-
-if (1) {
-
- # set the clock from the ntp server, discard offset
- $OFFSET = get_offset();
- die "Error: no NTP server response from $NTPSERVER" if $OFFSET eq 'N/A';
- printf STDERR "Initial time offset is %f seconds\n", $OFFSET if $VERBOSE;
-
- # wait a long time...
- printf STDERR "Going to sleep for %d seconds ... ", $INTERVAL if $VERBOSE;
- $DELTA = time();
- sleep($INTERVAL);
- $DELTA = time()-$DELTA;
- printf STDERR "slept for %d seconds\n", $DELTA if $VERBOSE;
-
- # set the clock from the ntp server, offset is our clock error
- $OFFSET = get_offset();
- die "Error: no NTP server response from $NTPSERVER" if $OFFSET eq 'N/A';
- printf STDERR "Final time offset is %f seconds\n", $OFFSET if $VERBOSE;
-
-}
-
-# --------------------------------------------------------------------------------
-
-# Now compute the correct value of the tickadj number as:
-#
-# corr tick = curr tick * (sample time [sec] + offset [sec]) / sample time [sec]
-# = 10000 * (3600 + (-3.261289)) / 3600
-# = 9991
-
-if (1) {
-
- my ($TICKOLD,$TICKNEW,$TICKOPT,$TICKEND) = (10000,10000,10000,10000);
-
- # get current tickadj value
- $TICKOLD = get_tickadj();
- printf STDERR "Current tick adjustment is %d\n", $TICKOLD if $VERBOSE;
-
- # compute what the tickadj should be based on time measurement
- $TICKOPT = $TICKOLD*($DELTA+$OFFSET)/$DELTA;
- printf STDERR "Optimal tick adjustment is %d [%f]\n", int($TICKOPT+0.5),$TICKOPT if $VERBOSE;
- # only change the tickadj by at most +/-10% in one shot, convert to an int
- $TICKNEW = int(max(min($TICKOPT,1.1*$TICKOLD),0.9*$TICKOLD)+0.5);
- printf STDERR "Range limited tick adjustment is %d\n", $TICKNEW
- if $VERBOSE && $TICKNEW != int($TICKOPT+0.5);
-
- if ($TICKOLD == $TICKNEW) {
- # old/new values same, no adjustment required
- printf STDERR "No tick adjustment required\n" if $VERBOSE;
- } elsif (!$CHECKONLY) {
- # update the tickadj value, if different
- $TICKEND = get_tickadj($TICKNEW);
- printf STDERR "Updated tick adjustment is %d\n", $TICKEND if $VERBOSE;
- printf STDERR "Error: Failed tickadj; exp=%d, rcv=%d\n", $TICKNEW, $TICKEND
- if $TICKNEW != $TICKEND;
- }
-
-}
-
-# --------------------------------------------------------------------------------
-
-# After the tickadj update, now recheck the calibration of the clock:
-#
-# ntpdate -b server; sleep 3600; ntpdate -b server
-# 23 Nov 12:29:50 ntpdate[496]: step time server server offset 0.001564 sec
-# 23 Nov 13:29:55 ntpdate[498]: step time server server offset 0.003010 sec
-
-if ($CHECKEND) {
-
- # set the clock from the ntp server, discard offset
- $OFFSET = get_offset();
- die "Error: no NTP server response from $NTPSERVER" if $OFFSET eq 'N/A';
- printf STDERR "Initial time offset is %f seconds\n", $OFFSET if $VERBOSE;
-
- # wait a long time...
- printf STDERR "Going to sleep for %d seconds ... ", $INTERVAL if $VERBOSE;
- $DELTA = time();
- sleep($INTERVAL);
- $DELTA = time()-$DELTA;
- printf STDERR "slept for %d seconds\n", $DELTA if $VERBOSE;
-
- # set the clock from the ntp server, offset is our clock error
- $OFFSET = get_offset();
- die "Error: no NTP server response from $NTPSERVER" if $OFFSET eq 'N/A';
- printf STDERR "Final time offset is %f seconds\n", $OFFSET if $VERBOSE;
-
-}
-
-# --------------------------------------------------------------------------------
-
-exit;
-
-##################################################################################
-
-# return time offset from ntp server, or N/A if not available
-
-sub get_offset { # ()
-
- foreach my $k (1..$RETRYCOUNT) {
- # query the server, check response
- foreach my $line (`/usr/sbin/ntpdate -b $NTPSERVER`) {
- printf STDERR "DEBUG: [%s]\n", $line if $DEBUG;
- # return offset if we get a valid number response
- return $1 if $line =~ m/\s+offset\s+(-?\d+[.]\d+)\s+sec\s*$/i;
- }
- # no response, retry with exponential delay
- printf STDERR "Error: no response from server %s, will retry in %d sec\n",
- $NTPSERVER, $RETRYDELAY*2**($k-1) if $VERBOSE;
- sleep($RETRYDELAY*2**($k-1));
- }
- # whoops, no response at all
- return 'N/A';
-
-}
-
-##################################################################################
-
-# return system tick adj value, set it if non-blank argument supplied
-
-sub get_tickadj { # ($)
-
- my ($tick) = @_;
- $tick = '' unless defined($tick);
-
- foreach my $line (`/usr/bin/tickadj $tick`) {
- printf STDERR "DEBUG: [%s]\n", $line if $DEBUG;
- return $1 if $line =~ m/^tick\s+=\s+(\d+)\s*$/i;
- }
- # whoops, tickadj failed
- return -1;
-
-}
-
-##################################################################################
-
-sub min { my ($a,$b) = @_; return $a <= $b ? $a : $b; }
-
-sub max { my ($a,$b) = @_; return $a >= $b ? $a : $b; }
-
-##################################################################################
-
-# the end