Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Commits on Source (4)
Remove duplicate include sys/ioctl.h in refclock_trimble
· 8f7014a7
Hal Murray
authored
Dec 11, 2018
8f7014a7
call seccomp_release() -- free up storage
· 51625689
Hal Murray
authored
Dec 11, 2018
51625689
Add support for NetBSD to buildprep
· d1db00eb
Hal Murray
authored
Dec 13, 2018
d1db00eb
Add support for FreeBSD to buildprep
· dcb1d0e2
Hal Murray
authored
Dec 14, 2018
dcb1d0e2
Hide whitespace changes
Inline
Side-by-side
buildprep
View file @
dcb1d0e2
...
...
@@ -10,6 +10,8 @@ DRYRUN="no"
NTPVIZ
=
"no"
DOC
=
"no"
OS
=
`
uname
-s
`
# Loop through option flags
for
optflag
in
"
$@
"
do
...
...
@@ -50,7 +52,8 @@ done
cat
<<
EOF
# Preparing your system for ntpsec source build...
# This script presently knows about:
# CentOS, Debian, Fedora, Gentoo, SLES, Ubuntu, and Alpine Linux
# CentOS, Debian, Fedora, Gentoo, NetBSD, FreeBSD,
$
SLES, Ubuntu, and Alpine Linux
# If you are running something else, such as macOS or Solaris, please
# read the source for this buildprep script to get an idea of what packages
# are required.
...
...
@@ -60,7 +63,8 @@ EOF
if
[
"
$DRYRUN
"
=
"yes"
]
then
do
=
echo
echo
"# Run this without -n|--dry-run, as root, for actual installation.
\n
#"
echo
"# Run this without -n|--dry-run, as root, for actual installation."
echo
"#"
else
do
=
""
if
[
"
$(
id
-u
)
"
!=
0
]
...
...
@@ -101,6 +105,31 @@ then
# Alpine Linux, musl rather than glibc
installer
=
apk
install
=
"
$do
$installer
add"
elif
test
"
$OS
"
=
"NetBSD"
then
if
pkgin
-v
then
# NetBSD binary package installer
installer
=
pkgin
install
=
"
$do
$installer
install"
else
echo
"## Looks like a NetBSD system"
echo
"## You need to setup pkgin"
echo
"## The last page of install disk has a check-box to do it"
echo
"## But you don't get that option on a Raspberry Pi."
echo
"## For the Pi, do something like:"
echo
"## pkg_add ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/earmv7hf/8.0/All/pkgin-0.9.4nb8.tgz"
echo
"## Adjust the version an arch to match your setup."
exit
1
fi
elif
test
"
$OS
"
=
"FreeBSD"
then
if
pkg
-v
then
# FreeBSD binary package installer
installer
=
pkg
install
=
"
$do
$installer
install"
fi
else
echo
"# ERROR: Package manager unidentified - Unsupported operating system"
exit
1
...
...
@@ -142,6 +171,29 @@ daemon () {
$install
sys-libs/libcap sys-libs/libseccomp
$install
sys-devel/bison net-misc/pps-tools
;;
pkgin
)
# NetBSD
# There is nothing magic about 3.7.
# In Dec 2018, 3.6 and 2.7 are also good candidates.
$install
bison python37 py37-curses-3.7
# setup "python" from command line
$do
ln
-s
/usr/pkg/bin/python3.7 /usr/pkg/bin/python
$do
ln
-s
/usr/pkg/bin/python3.7 /usr/pkg/bin/python3
# Add to Python search path
if
[
"
$DRYRUN
"
=
"yes"
]
then
echo echo
/usr/local/lib/python3.7/site-packages
\>
\\
echo
" "
/usr/pkg/lib/python3.7/site-packages/ntpsec.pth
else
echo
/usr/local/lib/python3.7/site-packages
>
\
/usr/pkg/lib/python3.7/site-packages/ntpsec.pth
fi
;;
pkg
)
# FreeBSD
$install
bison python3
$do
ln
-s
/usr/local/bin/python3 /usr/local/bin/python
;;
yum|dnf
)
$do
$installer
groupinstall
"Development Tools"
# Build environment
$install
bison openssl-devel
# build
...
...
@@ -231,6 +283,12 @@ doc () {
echo
"# You may need to enable EPEL repositories"
$install
asciidoc
;;
pkgin
)
$install
asciidoc
;;
pkg
)
$install
asciidoc
;;
yast|zypper
)
$install
asciidoc
;;
...
...
ntpd/ntp_sandbox.c
View file @
dcb1d0e2
...
...
@@ -448,6 +448,8 @@ int scmp_sc[] = {
else
{
msyslog
(
LOG_NOTICE
,
"INIT: sandbox: seccomp enabled."
);
}
seccomp_release
(
ctx
);
#endif
/* HAVE_SECCOMP_H */
return
nonroot
;
...
...
ntpd/refclock_trimble.c
View file @
dcb1d0e2
...
...
@@ -20,10 +20,6 @@
#include
"config.h"
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
/* not HAVE_SYS_IOCTL_H */
#if defined HAVE_SYS_MODEM_H
#include
<sys/modem.h>
#endif
...
...