Radix cross Linux

The main Radix cross Linux repository contains the build scripts of packages, which have the most complete and common functionality for desktop machines

452 Commits   2 Branches   1 Tag
Index: geoip-update.in
===================================================================
--- geoip-update.in	(nonexistent)
+++ geoip-update.in	(revision 5)
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+### Sample download script for https://mailfud.org/geoip-legacy/
+### - Adjust DBDIR and FILES below
+### - Copy script to /etc/cron.weekly or similar for your OS,
+###   note that /etc/cron.* filename MUST NOT HAVE .sh extension,
+###   rename to /etc/cron.weekly/geoip_update
+### Contact: admin@mailfud.org
+
+# Database directory
+DBDIR=@DATABASES_DIR@
+# Files to download (.dat.gz suffix not required)
+# FILES="GeoIP GeoIPv6 GeoIPCity GeoIPCityv6 GeoIPASNum GeoIPASNumv6 GeoIPOrg GeoIPISP"
+FILES="@DATABASES_LIST@"
+
+# If http proxy needed
+#https_proxy="http://foo.bar:3128"
+
+### v0.24
+### - add support for Ubuntu 22.04 /usr/libexec/xtables-addons/xt_geoip_build
+### v0.23
+### - fix xtables 3.8+, requires dbip-country-lite.csv
+### v0.22
+### - fix xtables stuff
+### v0.21
+### - added GeoIPCityv6, GeoIPASNumv6, fix https_proxy export
+
+# DB directory
+test -w $DBDIR && cd $DBDIR 2>/dev/null || { echo "Invalid directory: $DBDIR"; exit 1; }
+
+# Sleep 0-600 sec if started from cron
+if [ ! -t 0 ]; then sleep $((RANDOM/54)); fi
+
+export https_proxy
+for f in $FILES; do
+  # Make sure .gz is stripped
+  f=${f%*.gz}
+  # Make sure .dat exists
+  if [[ ! "$f" =~ \.csv ]]; then f=${f%*.dat}.dat; fi
+  # .gz files are kept on disk to compare timestamps (-N)
+  wget -nv -N -T 30 --max-redirect 0 https://mailfud.org/geoip-legacy/$f.gz
+  RET=$?
+  if [ $RET -ne 0 ]; then
+          echo "wget $f.gz failed: $RET" >&2
+          continue
+  fi
+  # Unpack and replace files atomically
+  if gzip -dc $f.gz >$f.tmp; then
+    if ! diff $f $f.tmp >/dev/null 2>&1; then
+      if [ "$f" = "$XTABLES" ]; then XUPD=1; fi
+      echo "updating $f"
+      chmod 644 $f.tmp
+      /bin/mv -f $f.tmp $f
+    else
+      echo "$f is up to date"
+    fi
+  else
+    echo "gunzip $f failed" >&2
+    rm -f $f.gz
+  fi
+  rm -f $f.tmp
+done
Index: .
===================================================================
--- .	(nonexistent)
+++ .	(revision 5)

Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~