diff options
Diffstat (limited to 'development/config-file-validator')
4 files changed, 127 insertions, 0 deletions
diff --git a/development/config-file-validator/README b/development/config-file-validator/README new file mode 100644 index 0000000000..e3bf8f3a27 --- /dev/null +++ b/development/config-file-validator/README @@ -0,0 +1,4 @@ +The config-file-validator only performs syntax validation. + +NOTE: +This script requires network access to download Go modules. diff --git a/development/config-file-validator/config-file-validator.SlackBuild b/development/config-file-validator/config-file-validator.SlackBuild new file mode 100644 index 0000000000..d6ba551912 --- /dev/null +++ b/development/config-file-validator/config-file-validator.SlackBuild @@ -0,0 +1,94 @@ +#!/bin/bash + +# Slackware build script for config-file-validator + +# Copyright 2025 Ioannis Anagnostakis GR +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=config-file-validator +VERSION=${VERSION:-1.8.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +CGO_ENABLED=0 \ + GOOS=linux \ + GOARCH=amd64 \ + go build \ + -ldflags='-w -s -extldflags "-static"' \ + -tags netgo \ + -o validator \ + cmd/validator/validator.go + + mkdir -p $PKG/usr/bin + install -Dm755 validator $PKG/usr/bin/validator + +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE README.md \ +$PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/development/config-file-validator/config-file-validator.info b/development/config-file-validator/config-file-validator.info new file mode 100644 index 0000000000..2cde2971a7 --- /dev/null +++ b/development/config-file-validator/config-file-validator.info @@ -0,0 +1,10 @@ +PRGNAM="config-file-validator" +VERSION="1.8.1" +HOMEPAGE="https://github.com/Boeing/config-file-validator" +DOWNLOAD="https://github.com/Boeing/config-file-validator/archive/v1.8.1/config-file-validator-1.8.1.tar.gz" +MD5SUM="64dce66749616256d4504312f513a069" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="google-go-lang" +MAINTAINER="Ioannis Anagnostakis" +EMAIL="rizitis@gmail.com" diff --git a/development/config-file-validator/slack-desc b/development/config-file-validator/slack-desc new file mode 100644 index 0000000000..6c41fe35dc --- /dev/null +++ b/development/config-file-validator/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +config-file-validator: config-file-validator (performs syntax validation) +config-file-validator: +config-file-validator: The config-file-validator only performs syntax validation. +config-file-validator: We are working toward adding support for +config-file-validator: schema validation in future releases. +config-file-validator: The config-file-validator is built as a statically linked binary +config-file-validator: the statically-linked binary can be moved to a location on your +config-file-validator: operating system PATH. +config-file-validator: +config-file-validator: https://github.com/Boeing/config-file-validator +config-file-validator: |