diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:48:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:48:22 +0000 |
commit | 7373ce3d6988706388f136e1c06afd20a3e8d5be (patch) | |
tree | e9ae5af7d102667e5706187646db45de8238e8c4 /pkg | |
parent | Initial commit. (diff) | |
download | monitoring-plugins-7373ce3d6988706388f136e1c06afd20a3e8d5be.tar.xz monitoring-plugins-7373ce3d6988706388f136e1c06afd20a3e8d5be.zip |
Adding upstream version 2.3.5.upstream/2.3.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/fedora/requires | 33 | ||||
-rw-r--r-- | pkg/redhat/requires | 35 | ||||
-rw-r--r-- | pkg/solaris/pkginfo | 12 | ||||
-rw-r--r-- | pkg/solaris/pkginfo.in | 12 | ||||
-rwxr-xr-x | pkg/solaris/preinstall | 35 | ||||
-rwxr-xr-x | pkg/solaris/solpkg | 90 |
6 files changed, 217 insertions, 0 deletions
diff --git a/pkg/fedora/requires b/pkg/fedora/requires new file mode 100644 index 0000000..03919f1 --- /dev/null +++ b/pkg/fedora/requires @@ -0,0 +1,33 @@ +Requires: bind-utils +Requires: coreutils +Requires: gawk +Requires: grep +Requires: iputils +Requires: openldap +Requires: mysql +Requires: openssl +Requires: postgresql-libs +Requires: net-snmp-utils +Requires: ntp +Requires: openssh-clients +Requires: perl +Requires: procps +Requires: python +Requires: samba-client +Requires: shadow-utils +Requires: traceroute +Requires: /usr/bin/mailq +BuildRequires: bind-utils +BuildRequires: coreutils +BuildRequires: iputils +BuildRequires: mysql-devel +BuildRequires: net-snmp-utils +BuildRequires: net-tools +BuildRequires: ntp +BuildRequires: openldap-devel +BuildRequires: openssh-clients +BuildRequires: openssl-devel +BuildRequires: postgresql-devel +BuildRequires: procps +BuildRequires: samba-client +BuildRequires: /usr/bin/mailq diff --git a/pkg/redhat/requires b/pkg/redhat/requires new file mode 100644 index 0000000..67126a8 --- /dev/null +++ b/pkg/redhat/requires @@ -0,0 +1,35 @@ +Requires: bind-utils +Requires: fileutils +Requires: gawk +Requires: grep +Requires: iputils +Requires: openldap +Requires: mysql +Requires: openssl +Requires: postgresql-libs +Requires: net-snmp-utils +Requires: ntp +Requires: openssh-clients +Requires: perl +Requires: procps +Requires: python +Requires: samba-client +Requires: sh-utils +Requires: shadow-utils +Requires: textutils +Requires: traceroute +Requires: /usr/bin/mailq +BuildRequires: bind-utils +BuildRequires: iputils +BuildRequires: mysql-devel +BuildRequires: net-snmp-utils +BuildRequires: net-tools +BuildRequires: ntp +BuildRequires: openldap-devel +BuildRequires: openssh-clients +BuildRequires: openssl-devel +BuildRequires: postgresql-devel +BuildRequires: procps +BuildRequires: samba-client +BuildRequires: sh-utils +BuildRequires: /usr/bin/mailq diff --git a/pkg/solaris/pkginfo b/pkg/solaris/pkginfo new file mode 100644 index 0000000..75f7b70 --- /dev/null +++ b/pkg/solaris/pkginfo @@ -0,0 +1,12 @@ +PKG="NGOSplugin" +NAME="monitoring-plugins" +DESC="Network Monitoring Plugins for Nagios and compatible" +ARCH="unknown" +VERSION="2.3.5,REV=2023.10.18.09.15" +CATEGORY="application" +VENDOR="Monitoring Plugins Development Team" +EMAIL="devel@monitoring-plugins.org" +PSTAMP="nag20231018091518" +BASEDIR="/" +CLASSES="none" + diff --git a/pkg/solaris/pkginfo.in b/pkg/solaris/pkginfo.in new file mode 100644 index 0000000..835ce6d --- /dev/null +++ b/pkg/solaris/pkginfo.in @@ -0,0 +1,12 @@ +PKG="NGOSplugin" +NAME="monitoring-plugins" +DESC="Network Monitoring Plugins for Nagios and compatible" +ARCH="@PKG_ARCH@" +VERSION="@PACKAGE_VERSION@,REV=@REV_DATESTAMP@" +CATEGORY="application" +VENDOR="Monitoring Plugins Development Team" +EMAIL="devel@monitoring-plugins.org" +PSTAMP="nag@REV_TIMESTAMP@" +BASEDIR="/" +CLASSES="none" + diff --git a/pkg/solaris/preinstall b/pkg/solaris/preinstall new file mode 100755 index 0000000..c4cc269 --- /dev/null +++ b/pkg/solaris/preinstall @@ -0,0 +1,35 @@ +#!/usr/bin/sh + +user="nagios" +uid=-1 +group="nagios" +gid=-1 + +/usr/bin/getent group $group > /dev/null 2> /dev/null +result=$? +if [ $result -eq 2 ] ; then + echo "Group $group does not exist. Creating..." + if [ $gid -ne -1 ] ; then + /usr/sbin/groupadd -g $gid $group + else + /usr/sbin/groupadd $group + fi +elif [ $result -ne 0 ] ; then + echo "An error occurred determining the existence of the groug $group. Terminating." + exit 1; +fi + +/usr/bin/getent passwd $user > /dev/null 2> /dev/null +result=$? +if [ $result -eq 2 ] ; then + echo "User $user does not exist. Creating..." + if [ $uid -ne -1 ] ; then + /usr/sbin/useradd -u $uid -g $group $user + else + /usr/sbin/useradd -g $group $user + fi +elif [ $result -ne 0 ] ; then + echo "An error occurred determining the existence of the user $user. Terminating." + exit 1; +fi + diff --git a/pkg/solaris/solpkg b/pkg/solaris/solpkg new file mode 100755 index 0000000..73b3c64 --- /dev/null +++ b/pkg/solaris/solpkg @@ -0,0 +1,90 @@ +#!/usr/bin/perl + +$pkgdevice = $ARGV[0] || die "Unable to determine device ($!)\n"; + +$find = "/usr/bin/find"; +$pkgproto = "/usr/bin/pkgproto"; +$pkgmk = "/usr/bin/pkgmk"; +$pkgtrans = "/usr/bin/pkgtrans"; +$prototype = "prototype"; +$pkginfo = "pkginfo"; +$preinstall = "preinstall"; +$egrep = "/usr/bin/grep -E"; + +# Sanity check + +$pwd = `pwd`; +if ($pwd =~ '\/usr\/local') { + $pwd = $`; +} +die "Wrong location, please cd to <PKGBASE>/usr/local/ and run again.\n" + if ($pwd eq ""); + +open (PREPROTO,"$find . -print |$egrep -v \"^\.(/usr(/local)?|/opt)?\$\" | $pkgproto |") || + die "Unable to read prototype information ($!)\n"; +open (PROTO,">$prototype") || + die "Unable to write file prototype ($!)\n"; +print PROTO "i pkginfo=./$pkginfo\n"; +print PROTO "i preinstall=./$preinstall\n"; +while (<PREPROTO>) { + # Read in the prototype information + chomp; + $thisline = $_; + if ($thisline =~ " prototype " + or $thisline =~ " pkginfo " + or $thisline =~ " preinstall ") { + # Don't do anything as they aren't important + } elsif ($thisline =~ "pst3") { + # Needs to be installed SUID root + ($dir, $none, $file, $mode, $user, $group) = split / /,$thisline; + print PROTO "$dir $none $file 4755 root bin\n"; + + } elsif ($thisline =~ "^[fd] ") { + # Change the ownership of files and directories + ($dir, $none, $file, $mode, $user, $group) = split / /,$thisline; + print PROTO "$dir $none $file $mode $user bin\n"; + } else { + # Symlinks and other stuff should be printed also + print PROTO "$thisline\n"; + } +} +close PROTO; +close PREPROTO; + +# Now we can start building the package + +$os = `uname -r`; +$os =~ '\.'; +$os = "sol$'"; +chomp $os; + +open (PKGINFO,"<$pkginfo") || + die "Unable to read package information ($!)\n"; +while (<PKGINFO>) { + # Read in the package information + chomp; + $thisline = $_; + ($var,$value) = split /=/,$thisline; + if ("$var" eq "NAME" + or "$var" eq "PKG" + or "$var" eq "VERSION" + or "$var" eq "ARCH") { + $tmp = lc($var); + $value =~ s/\"//g; + if ("$tmp" eq "version" + and $value =~ ",REV") { + ($value,$var) = split /\,/,$value; + $$tmp = $value; + } else { + $$tmp = $value; + } + } +} +close PKGINFO; + +$packagename = "$name-$version-$os-$arch-local"; + +print "Building package\n"; +system ("$pkgmk -o -r `pwd` -d $pkgdevice"); +system ("(cd $pkgdevice && $pkgtrans -s `pwd` ../$packagename $pkg)"); +print "Done. ($packagename)\n"; |