From fae60f1b93ba47723266a91c2e63a35a861475df Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 4 Apr 2017 21:03:19 -0400 Subject: udpated to 1.1-3 --- usr/share/mirror/deploy.sh | 16 ++-- usr/share/mirror/docs/README.txt | 24 ++++-- usr/share/mirror/docs/debian/conffiles | 0 usr/share/mirror/docs/debian/control | 0 usr/share/mirror/docs/debian/postinst | 0 usr/share/mirror/docs/debian/postrm | 0 usr/share/mirror/docs/debian/preinst | 0 usr/share/mirror/docs/debian/prerm | 0 usr/share/mirror/docs/mirror.spec | 99 +++++++++++----------- usr/share/mirror/examples/HEADER.html | 38 ++------- .../mirror/examples/example-debian/FOOTER.html | 4 - .../mirror/examples/example-debian/HEADER.html | 13 --- .../examples/example-debian/example-debian.gpg | 51 ----------- .../examples/example-debian/example-debian.list | 1 - .../example-debian/update-example-debian.sh | 28 ------ usr/share/mirror/examples/example-rpm/FOOTER.html | 8 -- usr/share/mirror/examples/example-rpm/HEADER.html | 9 -- .../mirror/examples/example-rpm/example-rpm.repo | 8 -- .../examples/example-rpm/update-example-rpm.sh | 9 -- usr/share/mirror/examples/exampledeb/FOOTER.html | 4 + usr/share/mirror/examples/exampledeb/HEADER.html | 13 +++ .../mirror/examples/exampledeb/smith122deb.gpg | 51 +++++++++++ .../mirror/examples/exampledeb/smith122deb.list | 1 + .../examples/exampledeb/update-smith122deb.sh | 29 +++++++ usr/share/mirror/examples/examplerpm/FOOTER.html | 8 ++ usr/share/mirror/examples/examplerpm/HEADER.html | 12 +++ .../mirror/examples/examplerpm/smith122rpm.repo | 7 ++ .../examples/examplerpm/update-smith122rpm.sh | 10 +++ usr/share/mirror/examples/sites/10.1.8.63.conf | 5 -- usr/share/mirror/examples/sites/mirror.conf | 65 -------------- usr/share/mirror/examples/sites/mntscripts.conf | 24 ------ usr/share/mirror/examples/sites/zz_proxy.conf | 23 ++--- usr/share/mirror/inc/get-files | 36 ++++++++ usr/share/mirror/inc/get-files-core | 43 ++++++++++ usr/share/mirror/inc/localize_git.sh | 2 +- usr/share/mirror/inc/pack | 16 ++-- usr/share/mirror/inc/rsync | 2 +- usr/share/mirror/inc/scrub.txt | 17 +--- usr/share/mirror/mirror-master.sh | 2 +- usr/share/mirror/scripts/centos | 0 usr/share/mirror/scripts/fedora-epel | 0 usr/share/mirror/scripts/fedora-releases | 0 usr/share/mirror/scripts/fedora-updates | 0 usr/share/mirror/scripts/libreoffice | 0 usr/share/mirror/scripts/linuxmint-isos | 0 usr/share/mirror/scripts/linuxmint-repos | 0 usr/share/mirror/scripts/putty | 0 usr/share/mirror/scripts/rsyslog | 0 usr/share/mirror/scripts/ssh | 0 usr/share/mirror/scripts/ubuntu | 0 usr/share/mirror/scripts/ubuntu-releases | 0 51 files changed, 312 insertions(+), 366 deletions(-) delete mode 100644 usr/share/mirror/docs/debian/conffiles delete mode 100644 usr/share/mirror/docs/debian/control delete mode 100755 usr/share/mirror/docs/debian/postinst delete mode 100755 usr/share/mirror/docs/debian/postrm delete mode 100755 usr/share/mirror/docs/debian/preinst delete mode 100755 usr/share/mirror/docs/debian/prerm delete mode 100644 usr/share/mirror/examples/example-debian/FOOTER.html delete mode 100644 usr/share/mirror/examples/example-debian/HEADER.html delete mode 100644 usr/share/mirror/examples/example-debian/example-debian.gpg delete mode 100644 usr/share/mirror/examples/example-debian/example-debian.list delete mode 100755 usr/share/mirror/examples/example-debian/update-example-debian.sh delete mode 100644 usr/share/mirror/examples/example-rpm/FOOTER.html delete mode 100644 usr/share/mirror/examples/example-rpm/HEADER.html delete mode 100644 usr/share/mirror/examples/example-rpm/example-rpm.repo delete mode 100755 usr/share/mirror/examples/example-rpm/update-example-rpm.sh create mode 100644 usr/share/mirror/examples/exampledeb/FOOTER.html create mode 100644 usr/share/mirror/examples/exampledeb/HEADER.html create mode 100644 usr/share/mirror/examples/exampledeb/smith122deb.gpg create mode 100644 usr/share/mirror/examples/exampledeb/smith122deb.list create mode 100755 usr/share/mirror/examples/exampledeb/update-smith122deb.sh create mode 100644 usr/share/mirror/examples/examplerpm/FOOTER.html create mode 100644 usr/share/mirror/examples/examplerpm/HEADER.html create mode 100644 usr/share/mirror/examples/examplerpm/smith122rpm.repo create mode 100755 usr/share/mirror/examples/examplerpm/update-smith122rpm.sh delete mode 100644 usr/share/mirror/examples/sites/10.1.8.63.conf delete mode 100644 usr/share/mirror/examples/sites/mirror.conf delete mode 100644 usr/share/mirror/examples/sites/mntscripts.conf create mode 100755 usr/share/mirror/inc/get-files create mode 100755 usr/share/mirror/inc/get-files-core mode change 100755 => 100644 usr/share/mirror/scripts/centos mode change 100755 => 100644 usr/share/mirror/scripts/fedora-epel mode change 100755 => 100644 usr/share/mirror/scripts/fedora-releases mode change 100755 => 100644 usr/share/mirror/scripts/fedora-updates mode change 100755 => 100644 usr/share/mirror/scripts/libreoffice mode change 100755 => 100644 usr/share/mirror/scripts/linuxmint-isos mode change 100755 => 100644 usr/share/mirror/scripts/linuxmint-repos mode change 100755 => 100644 usr/share/mirror/scripts/putty mode change 100755 => 100644 usr/share/mirror/scripts/rsyslog mode change 100755 => 100644 usr/share/mirror/scripts/ssh mode change 100755 => 100644 usr/share/mirror/scripts/ubuntu mode change 100755 => 100644 usr/share/mirror/scripts/ubuntu-releases (limited to 'usr') diff --git a/usr/share/mirror/deploy.sh b/usr/share/mirror/deploy.sh index 0adb090..a218d39 100755 --- a/usr/share/mirror/deploy.sh +++ b/usr/share/mirror/deploy.sh @@ -14,7 +14,7 @@ # Improve: # * provide better package name and version parsing fiversion="2016-05-25a" -deployversion="2016-07-14a" +deployversion="2017-04-04a" usage() { less -F >&2 <&2 conffile=/etc/mirror/deploy.conf logfile=${scriptdir}/${scripttrim}.${today}.out -interestedparties="bgstack15@example.com" +interestedparties="bgstack15@gmail.com" noupdate=0 # can be adjusted with a flag # REACT TO ROOT STATUS @@ -212,7 +212,7 @@ do line=$( echo "${line}" | sed -e 's/^\s*//;s/\s*$//;/^[#$]/d;s/\s*[^\]#.*$//;' for thiszone in ${zones[@]}; do [[ ! "${thiszone}" = "input" ]] && { - debuglev 5 && ferror "Running zone ${thiszone}" + debuglev 5 && ferror "Running ${thiszone}" eval thislocation=\${${thiszone}location} if [[ -z "${thislocation}" ]] || [[ ! -d "${thislocation}" ]]; then continue; fi @@ -243,14 +243,14 @@ do line=$( echo "${line}" | sed -e 's/^\s*//;s/\s*$//;/^[#$]/d;s/\s*[^\]#.*$//;' # CALCULATE DESTINATION FILE destinationdir=$( { find "${thispackagedir}" -maxdepth 0 -type d; find "${thislocation}" -maxdepth 0 -type d; } 2>/dev/null | grep -viE "^$" | head -n1 ) #debuglev 5 && ferror "destinationdir=${destinationdir}" - [[ ! -d "${destinationdir}" ]] && ferror "Zone ${thiszone} file ${sourcefile} cannot be copied to the invalid directory \"${destinationdir}\". Skipped." && continue + [[ ! -d "${destinationdir}" ]] && ferror "Skipped ${thiszone} file ${sourcefile}: cannot be copied to invalid directory \"${destinationdir}\"." && continue destinationfile=$( echo "${destinationdir}/$( basename "${sourcefile}" )" | sed -e 's!\/\+!\/!g;' ) debuglev 5 && ferror "destinationfile=${destinationfile}" # PERFORM FILE COPY if [[ ! -f "${sourcefile}" ]]; then - ferror "Sourcefile ${sourcefile} not found. Skipped the copy action." + ferror "Skipped ${thiszone} source ${sourcefile}: not found." else fileaction copy "${sourcefile}" "${destinationfile}" thiszoneused=1 @@ -264,7 +264,7 @@ do line=$( echo "${line}" | sed -e 's/^\s*//;s/\s*$//;/^[#$]/d;s/\s*[^\]#.*$//;' if [[ ! -f "${sourcetarfile}" ]]; then # link was yes, but tarball does not exist, so soft error. - ferror "Sourcetarfile ${sourcetarfile} not found. Skipped the tar file symlink." + ferror "Skipped ${thiszone} symlink for ${sourcetarfile}: not found." else # CALCULATE DESTINATION TARBALL FILE destinationtarfile="$( echo "${destinationdir}/$( basename "${sourcetarfile}" )" | sed -e 's!\/\+!\/!g;' )" @@ -285,7 +285,7 @@ do line=$( echo "${line}" | sed -e 's/^\s*//;s/\s*$//;/^[#$]/d;s/\s*[^\]#.*$//;' if test "${noupdate}" = "1"; then # told to not execute any update scripts at all. - ferror "Skipping any execute scripts." + ferror "Skipping any execute scripts for ${thiszone}." else [[ -n "${thisupdatescript}" ]] && { if [[ ! -x "${thisupdatescript}" ]]; diff --git a/usr/share/mirror/docs/README.txt b/usr/share/mirror/docs/README.txt index 85afdae..2955688 100644 --- a/usr/share/mirror/docs/README.txt +++ b/usr/share/mirror/docs/README.txt @@ -1,5 +1,5 @@ -File: etc/mirror/README.txt -Package: mirror 1.0-9 +File: /usr/share/mirror/docs/README.txt +Package: mirror Author: bgstack15@gmail.com Startdate: 2016-06-08 Title: Readme file for mirror @@ -19,12 +19,7 @@ Configure these files: /etc/httpd/sites/mirror.conf /usr/share/mirror/inc/rsync -Select a storage directory. On the EXAMPLE mirror, we used an nfs mount for multiple locations. ---- BEGIN excerpt from mirror.example.com:/etc/fstab -linux-nfs2.example.com:/vol/linux_mirror /mnt/realmirror nfs defaults,uid=1539249479 0 0 -/mnt/realmirror/mirror /mnt/mirror none bind 0 0 -/mnt/mirror /var/www/html/mirror.example.com none bind 0 0 ---- END +Select a storage directory. This one is preconfigured for /srv/science/smith122/repo ## Scripts to run The files called by mirror-master are the ones that actually do the source and target selection and file operations. By default they are located in /etc/mirror/scripts/ @@ -77,7 +72,7 @@ New feature: deploy See its config file /etc/mirror/inc/deploy.conf 2016-10-28 mirror 1.0-4 -Adding elemants for safe publishing on github +Adding elements for safe publishing on github Added repos for linuxmint 2016-11-11 mirror 1.0-5 @@ -99,3 +94,14 @@ Fixed dependency to bgscripts-core 2017-02-08 mirror-1.0-9 Updated scripts to use /usr/share/mirror/inc/rsync script + +2017-03-03 mirror-1.1-1 +Adapted for smith122 repos + +2017-03-04 mirror-1.1-2 +Fixed directories' ownership to this package so they are removed when the package is removed. + +2017-04-04 mirror-1.1-3 +Fixed deploy.sh to have more consistent and useful error messages +Fixed deploy.conf to point to /srv/science for everything +Changed deploy.conf to use package directories for deployment diff --git a/usr/share/mirror/docs/debian/conffiles b/usr/share/mirror/docs/debian/conffiles deleted file mode 100644 index e69de29..0000000 diff --git a/usr/share/mirror/docs/debian/control b/usr/share/mirror/docs/debian/control deleted file mode 100644 index e69de29..0000000 diff --git a/usr/share/mirror/docs/debian/postinst b/usr/share/mirror/docs/debian/postinst deleted file mode 100755 index e69de29..0000000 diff --git a/usr/share/mirror/docs/debian/postrm b/usr/share/mirror/docs/debian/postrm deleted file mode 100755 index e69de29..0000000 diff --git a/usr/share/mirror/docs/debian/preinst b/usr/share/mirror/docs/debian/preinst deleted file mode 100755 index e69de29..0000000 diff --git a/usr/share/mirror/docs/debian/prerm b/usr/share/mirror/docs/debian/prerm deleted file mode 100755 index e69de29..0000000 diff --git a/usr/share/mirror/docs/mirror.spec b/usr/share/mirror/docs/mirror.spec index b6404cb..a576b87 100644 --- a/usr/share/mirror/docs/mirror.spec +++ b/usr/share/mirror/docs/mirror.spec @@ -1,7 +1,7 @@ Summary: Mirror Name: mirror -Version: 1.0 -Release: 9 +Version: 1.1 +Release: 3 License: CC BY-SA 4.0 Group: Applications/System Source: mirror.tgz @@ -10,11 +10,11 @@ URL: bgstack15@gmail.com #Vendor: Packager: Bgstack15 Buildarch: noarch -PreReq: bgscripts-core >= 1.1-28 +Requires(pre): bgscripts-core >= 1.1-28 Requires: httpd >= 2.2 %description -Mirror is the rpm package for the official mirror.example.com installation. +Mirror is the rpm package for the official albion320.no-ip.biz installation. %prep %setup @@ -34,57 +34,60 @@ rm -rf ${buildroot} %preun %files +%dir /etc/mirror +%dir /usr/share/mirror +%dir /usr/share/mirror/examples +%dir /usr/share/mirror/examples/examplerpm +%dir /usr/share/mirror/examples/sites +%dir /usr/share/mirror/examples/exampledeb +%dir /usr/share/mirror/inc +%dir /usr/share/mirror/docs +%dir /usr/share/mirror/scripts %config /etc/sudoers.d/50_mirror-sudo %config /etc/cron.d/mirror.cron +%config /etc/httpd/conf.d/local_mirror.conf +/etc/httpd/conf.d/local_mirror-ssl.cnf %config /etc/mirror/deploy.conf %config /etc/mirror/mirror.conf -%config /etc/httpd/conf.d/local_mirror.conf -%verify(link) /usr/local/bin/deploy +/usr/share/httpd/icons/rpm.png +/usr/share/httpd/icons/repo.png +/usr/share/mirror/deploy.sh +/usr/share/mirror/examples/examplerpm/FOOTER.html +/usr/share/mirror/examples/examplerpm/update-smith122rpm.sh +/usr/share/mirror/examples/examplerpm/HEADER.html +/usr/share/mirror/examples/examplerpm/smith122rpm.repo +/usr/share/mirror/examples/FOOTER.html +/usr/share/mirror/examples/favicon.png +%config /usr/share/mirror/examples/sites/zz_proxy.conf +/usr/share/mirror/examples/HEADER.html +/usr/share/mirror/examples/exampledeb/FOOTER.html +/usr/share/mirror/examples/exampledeb/update-smith122deb.sh +/usr/share/mirror/examples/exampledeb/smith122deb.list +/usr/share/mirror/examples/exampledeb/HEADER.html +/usr/share/mirror/examples/exampledeb/smith122deb.gpg +/usr/share/mirror/examples/favicon.ico +/usr/share/mirror/inc/get-files +%doc %attr(444, -, -) /usr/share/mirror/inc/scrub.txt +/usr/share/mirror/inc/pack +/usr/share/mirror/inc/get-files-core +/usr/share/mirror/inc/rsync +/usr/share/mirror/inc/localize_git.sh +%doc %attr(444, -, -) /usr/share/mirror/docs/files-for-versioning.txt +/usr/share/mirror/docs/mirror.spec +%doc %attr(444, -, -) /usr/share/mirror/docs/packaging.txt +%doc %attr(444, -, -) /usr/share/mirror/docs/README.txt /usr/share/mirror/mirror-master.sh -%config /usr/share/mirror/scripts/ssh +%config /usr/share/mirror/scripts/fedora-updates %config /usr/share/mirror/scripts/libreoffice -%config /usr/share/mirror/scripts/linuxmint-repos -%config /usr/share/mirror/scripts/ubuntu +%config /usr/share/mirror/scripts/ubuntu-releases %config /usr/share/mirror/scripts/putty -%config /usr/share/mirror/scripts/rsyslog +%config /usr/share/mirror/scripts/ssh +%config /usr/share/mirror/scripts/ubuntu +%config /usr/share/mirror/scripts/fedora-releases %config /usr/share/mirror/scripts/centos -%config /usr/share/mirror/scripts/fedora-epel %config /usr/share/mirror/scripts/old-scripts.tgz -%config /usr/share/mirror/scripts/ubuntu-releases +%config /usr/share/mirror/scripts/fedora-epel %config /usr/share/mirror/scripts/linuxmint-isos -%config /usr/share/mirror/scripts/fedora-releases -%config /usr/share/mirror/scripts/fedora-updates -/usr/share/mirror/docs/debian/postinst -/usr/share/mirror/docs/debian/conffiles -/usr/share/mirror/docs/debian/prerm -/usr/share/mirror/docs/debian/postrm -/usr/share/mirror/docs/debian/control -/usr/share/mirror/docs/debian/preinst -%doc %attr(444, -, -) /usr/share/mirror/docs/README.txt -/usr/share/mirror/docs/mirror.spec -%doc %attr(444, -, -) /usr/share/mirror/docs/packaging.txt -%doc %attr(444, -, -) /usr/share/mirror/docs/files-for-versioning.txt -/usr/share/mirror/deploy.sh -/usr/share/mirror/inc/pack -/usr/share/mirror/inc/localize_git.sh -%doc %attr(444, -, -) /usr/share/mirror/inc/scrub.txt -/usr/share/mirror/inc/rsync -/usr/share/mirror/examples/favicon.ico -/usr/share/mirror/examples/FOOTER.html -/usr/share/mirror/examples/HEADER.html -%config /usr/share/mirror/examples/sites/zz_proxy.conf -%config /usr/share/mirror/examples/sites/10.1.8.63.conf -%config /usr/share/mirror/examples/sites/mntscripts.conf -%config /usr/share/mirror/examples/sites/mirror.conf -/usr/share/mirror/examples/example-debian/example-debian.list -/usr/share/mirror/examples/example-debian/update-example-debian.sh -/usr/share/mirror/examples/example-debian/FOOTER.html -/usr/share/mirror/examples/example-debian/HEADER.html -/usr/share/mirror/examples/example-debian/example-debian.gpg -/usr/share/mirror/examples/example-rpm/FOOTER.html -/usr/share/mirror/examples/example-rpm/HEADER.html -/usr/share/mirror/examples/example-rpm/example-rpm.repo -/usr/share/mirror/examples/example-rpm/update-example-rpm.sh -/usr/share/mirror/examples/favicon.png -/usr/share/httpd/icons/repo.png -/usr/share/httpd/icons/rpm.png +%config /usr/share/mirror/scripts/rsyslog +%config /usr/share/mirror/scripts/linuxmint-repos +%verify(link) /usr/local/bin/deploy diff --git a/usr/share/mirror/examples/HEADER.html b/usr/share/mirror/examples/HEADER.html index 1130cfc..07bb9e4 100644 --- a/usr/share/mirror/examples/HEADER.html +++ b/usr/share/mirror/examples/HEADER.html @@ -3,46 +3,24 @@ - Welcome to mirror.example.com + Welcome to Smith122 repository -

Welcome to mirror.example.com

- +

Welcome to Smith122 repository

+

-This is IT's Open Source software -mirror. We have gobs of software here to save you time downloading it from the -internet. If you need ftp access, try ftp://mirror.example.com. +If you need ftp access, try ftp://albion320.no-ip.biz/smith122/repo. -

- -If there is a project you would like to see mirrored, let us know at the e-mail -address at the bottom and we'll see what we can do. We can't guarantee your -favorite project will be mirrored, but if you have a reasonable request, we -will most likely be able to comply. - -

- -WARNING! There is no guarantee that this box will always be -up or that the software contained on it will be up-to-date, bug-free, safe, -uncorrupted or complete. Use this box and the software contained on it -at your own risk. -Due to the nature of maintaining this box, IT cannot take any responsibility -for problems or damage incurred by the software from this box. Please -DO NOT contact the Helpdesk with problems or questions concerning -this box. If you have questions, comments, or problem reports, contact mirror Administrator. However, as this is an "unofficial" -IT project, any response may be highly delayed. -

-That being said, have fun! -E-Mail the administrator at: mirror@example.com. +E-Mail the administrator at: bgstack15@gmail.com.


-Force http: http://mirror.example.com -Force https: https://mirror.example.com
+Force http: http://albion320.no-ip.biz/smith122/repo/ +Force https: https://albion320.no-ip.biz/smith122/repo/ diff --git a/usr/share/mirror/examples/example-debian/FOOTER.html b/usr/share/mirror/examples/example-debian/FOOTER.html deleted file mode 100644 index 7879e1c..0000000 --- a/usr/share/mirror/examples/example-debian/FOOTER.html +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/usr/share/mirror/examples/example-debian/HEADER.html b/usr/share/mirror/examples/example-debian/HEADER.html deleted file mode 100644 index 6ffade1..0000000 --- a/usr/share/mirror/examples/example-debian/HEADER.html +++ /dev/null @@ -1,13 +0,0 @@ - -mirror.example.com/ubuntu/example-debian repository - -

mirror.example.com/bgscripts

-
-

You can install the example-debian repo in the /etc/apt/sources.list.d/ directory with these command: -

-sudo wget --quiet http://mirror.example.com/ubuntu/example-debian/example-debian.gpg -O /root/example-debian.gpg
-sudo apt-key add /root/example-debian.gpg	
-sudo wget --quiet http://mirror.example.com/ubuntu/example-debian/example-debian.list -O /etc/apt/sources.list.d/example-debian.list
-
- - diff --git a/usr/share/mirror/examples/example-debian/example-debian.gpg b/usr/share/mirror/examples/example-debian/example-debian.gpg deleted file mode 100644 index d64a765..0000000 --- a/usr/share/mirror/examples/example-debian/example-debian.gpg +++ /dev/null @@ -1,51 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.22 (GNU/Linux) - -mQINBFdPNSABEACd9U4/KOjZjXj1S7ehqwpSNyM/bvhNaGjSq/jEj6WaxcgwC0Ot -gN7PVIJRnIcgUGf2MiK79XeX4ZJFZQ9KdYeN38hKEaaMLGW+U3KN84fnt/6DSExy -HFl4UBshtVbg9yPU54grkvvjx1bnAWGTHzyJILzIVC7bbvJkbddtT7cLy3zNNP7X -RAPXsKx8P2AfC0lGoyo5TSqY3807EPuTrCfW0ze++3p8NfHesGR57wA5EgPNimZd -gSeb9VN8B/FR7bSEYueL2jOupbi28ewQaN2PzZWffhuohoQrlLwQznKodmpKys9a -DK1bvaS7MsTJw1pRLLYnlRV05+SQ1XH8QYYRmH/Y+a5u/gJhXR5KhZmfUfhnhpwL -61bA7tnDdn2/y8dAPcppvuxuCFlh8VqL3Fyf8tQPaCRbITHMpwuahsnTyGKIDxz6 -01tfgC0HEfCwMcfxqLvEM2komVCp8LFkzdwoLl4pCKFmhZNq04FzyImKJceihBmp -C/mnxzDKPN1OhSIN2/DnnpD77r6vS7AWOBOcmMLHsvUDpKVlJQSVgNGjuQNDTfJE -uL4wGoqZSyOYTtUzu3L7lvNvvE4huTtBRwtYQkrtzlxhWmSfrkd2PKAZbjZDn2bB -plLkRYv0yeJnlUzVmPYvm1dOdirkVhdd4g3KaiDGCxXMiBXhIH5pQM5MkwARAQAB -tCBMaW51eCBBZG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kR7cp/Y1t83zJ8DKGck/TaUbwJBKJcYkGFoO9x+ZjF -keMeYGeTVuBsZabJJhnmH7E5c8+j328et4+/1J13xOAfixXef7Gzk4pT1m3ii7am -=ggDE ------END PGP PUBLIC KEY BLOCK----- diff --git a/usr/share/mirror/examples/example-debian/example-debian.list b/usr/share/mirror/examples/example-debian/example-debian.list deleted file mode 100644 index ad21fbb..0000000 --- a/usr/share/mirror/examples/example-debian/example-debian.list +++ /dev/null @@ -1 +0,0 @@ -deb http://mirror.example.com/ubuntu/example-debian/ / diff --git a/usr/share/mirror/examples/example-debian/update-example-debian.sh b/usr/share/mirror/examples/example-debian/update-example-debian.sh deleted file mode 100755 index 0a6e7a0..0000000 --- a/usr/share/mirror/examples/example-debian/update-example-debian.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -# working directory -repodir=/mnt/mirror/ubuntu/example-debian/ -cd ${repodir} -chmod 0644 *deb 1>/dev/null 2>&1 - -# create the package index -dpkg-scanpackages -m . > Packages -cat Packages | gzip -9c > Packages.gz - -# create the Release file -PKGS=$(wc -c Packages) -PKGS_GZ=$(wc -c Packages.gz) -cat < Release -Architectures: all -Date: $(date -R) -MD5Sum: - $(md5sum Packages | cut -d" " -f1) $PKGS - $(md5sum Packages.gz | cut -d" " -f1) $PKGS_GZ -SHA1: - $(sha1sum Packages | cut -d" " -f1) $PKGS - $(sha1sum Packages.gz | cut -d" " -f1) $PKGS_GZ -SHA256: - $(sha256sum Packages | cut -d" " -f1) $PKGS - $(sha256sum Packages.gz | cut -d" " -f1) $PKGS_GZ -EOF -gpg --batch --yes --passphrase-file /root/.gnupg/linuxadmin -abs -o Release.gpg Release diff --git a/usr/share/mirror/examples/example-rpm/FOOTER.html b/usr/share/mirror/examples/example-rpm/FOOTER.html deleted file mode 100644 index 57b6775..0000000 --- a/usr/share/mirror/examples/example-rpm/FOOTER.html +++ /dev/null @@ -1,8 +0,0 @@ - - -mirror.example.com/example-rpm repository - - -

Most contents are licensed under CC BY-SA 4.0.

- - diff --git a/usr/share/mirror/examples/example-rpm/HEADER.html b/usr/share/mirror/examples/example-rpm/HEADER.html deleted file mode 100644 index 105f0d8..0000000 --- a/usr/share/mirror/examples/example-rpm/HEADER.html +++ /dev/null @@ -1,9 +0,0 @@ - - -

mirror.example.com/example-rpm

-
-

You can install the example-rpm.repo in the /etc/yum.repos.d/ directory with this command: -

wget http://mirror.example.com/example-rpm/example-rpm.repo -O /etc/yum.repos.d/example-rpm.repo
-yum -y install bgscripts keepalive
- - diff --git a/usr/share/mirror/examples/example-rpm/example-rpm.repo b/usr/share/mirror/examples/example-rpm/example-rpm.repo deleted file mode 100644 index 12bca22..0000000 --- a/usr/share/mirror/examples/example-rpm/example-rpm.repo +++ /dev/null @@ -1,8 +0,0 @@ -# example-rpm.repo -# Install with: -# wget http://mirror.example.com/bgscripts/example-rpm.repo -O /etc/yum.repos.d/example-rpm.repo -[example-rpm] -name=example-rpm -baseurl=http://mirror.example.com/bgscripts/ -gpgcheck=0 -#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 diff --git a/usr/share/mirror/examples/example-rpm/update-example-rpm.sh b/usr/share/mirror/examples/example-rpm/update-example-rpm.sh deleted file mode 100755 index b3003af..0000000 --- a/usr/share/mirror/examples/example-rpm/update-example-rpm.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# working directory -repodir=/mnt/mirror/bgscripts/ -cd ${repodir} -chmod 0644 *rpm 1>/dev/null 2>&1 - -# create the package index -createrepo . diff --git a/usr/share/mirror/examples/exampledeb/FOOTER.html b/usr/share/mirror/examples/exampledeb/FOOTER.html new file mode 100644 index 0000000..7879e1c --- /dev/null +++ b/usr/share/mirror/examples/exampledeb/FOOTER.html @@ -0,0 +1,4 @@ + + + + diff --git a/usr/share/mirror/examples/exampledeb/HEADER.html b/usr/share/mirror/examples/exampledeb/HEADER.html new file mode 100644 index 0000000..50d8bfa --- /dev/null +++ b/usr/share/mirror/examples/exampledeb/HEADER.html @@ -0,0 +1,13 @@ + +Smith122 deb repository + +

Smith122 deb repository

+
+

You can install the smith122deb repo in the /etc/apt/sources.list.d/ directory with these commands: +

+sudo wget --quiet http://albion320.no-ip.biz/smith122/repo/deb/smith122deb.gpg -O /root/smith122deb.gpg
+sudo apt-key add /root/smith122deb.gpg
+sudo wget --quiet http://albion320.no-ip.biz/smith122/repo/deb/smith122deb.list -O /etc/apt-sources.list.d/smith122deb.list
+
+ + diff --git a/usr/share/mirror/examples/exampledeb/smith122deb.gpg b/usr/share/mirror/examples/exampledeb/smith122deb.gpg new file mode 100644 index 0000000..d64a765 --- /dev/null +++ b/usr/share/mirror/examples/exampledeb/smith122deb.gpg @@ -0,0 +1,51 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2.0.22 (GNU/Linux) + +mQINBFdPNSABEACd9U4/KOjZjXj1S7ehqwpSNyM/bvhNaGjSq/jEj6WaxcgwC0Ot +gN7PVIJRnIcgUGf2MiK79XeX4ZJFZQ9KdYeN38hKEaaMLGW+U3KN84fnt/6DSExy +HFl4UBshtVbg9yPU54grkvvjx1bnAWGTHzyJILzIVC7bbvJkbddtT7cLy3zNNP7X +RAPXsKx8P2AfC0lGoyo5TSqY3807EPuTrCfW0ze++3p8NfHesGR57wA5EgPNimZd +gSeb9VN8B/FR7bSEYueL2jOupbi28ewQaN2PzZWffhuohoQrlLwQznKodmpKys9a +DK1bvaS7MsTJw1pRLLYnlRV05+SQ1XH8QYYRmH/Y+a5u/gJhXR5KhZmfUfhnhpwL +61bA7tnDdn2/y8dAPcppvuxuCFlh8VqL3Fyf8tQPaCRbITHMpwuahsnTyGKIDxz6 +01tfgC0HEfCwMcfxqLvEM2komVCp8LFkzdwoLl4pCKFmhZNq04FzyImKJceihBmp +C/mnxzDKPN1OhSIN2/DnnpD77r6vS7AWOBOcmMLHsvUDpKVlJQSVgNGjuQNDTfJE +uL4wGoqZSyOYTtUzu3L7lvNvvE4huTtBRwtYQkrtzlxhWm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rcy8Nsa/NB8l +DJ0Q0kmAgQwvupy3tbT4STl58bRowvt/BPCWyb1YZItkNfYRpYGFPp/gLxDijYLT +L6YXT3oEVqeItDlLuCns57kR7cp/Y1t83zJ8DKGck/TaUbwJBKJcYkGFoO9x+ZjF +keMeYGeTVuBsZabJJhnmH7E5c8+j328et4+/1J13xOAfixXef7Gzk4pT1m3ii7am +=ggDE +-----END PGP PUBLIC KEY BLOCK----- diff --git a/usr/share/mirror/examples/exampledeb/smith122deb.list b/usr/share/mirror/examples/exampledeb/smith122deb.list new file mode 100644 index 0000000..feb67e2 --- /dev/null +++ b/usr/share/mirror/examples/exampledeb/smith122deb.list @@ -0,0 +1 @@ +deb http://albion320.no-ip.biz/smith122/repo/deb/ / diff --git a/usr/share/mirror/examples/exampledeb/update-smith122deb.sh b/usr/share/mirror/examples/exampledeb/update-smith122deb.sh new file mode 100755 index 0000000..a33d571 --- /dev/null +++ b/usr/share/mirror/examples/exampledeb/update-smith122deb.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +# working directory +repodir=/srv/science/smith122/repo/deb/ +cd ${repodir} +chmod 0644 *deb 1>/dev/null 2>&1 +restorecon -RF "${repodir}" + +# create the package index +dpkg-scanpackages -m . > Packages +cat Packages | gzip -9c > Packages.gz + +# create the Release file +PKGS=$(wc -c Packages) +PKGS_GZ=$(wc -c Packages.gz) +cat < Release +Architectures: all +Date: $(date -R) +MD5Sum: + $(md5sum Packages | cut -d" " -f1) $PKGS + $(md5sum Packages.gz | cut -d" " -f1) $PKGS_GZ +SHA1: + $(sha1sum Packages | cut -d" " -f1) $PKGS + $(sha1sum Packages.gz | cut -d" " -f1) $PKGS_GZ +SHA256: + $(sha256sum Packages | cut -d" " -f1) $PKGS + $(sha256sum Packages.gz | cut -d" " -f1) $PKGS_GZ +EOF +gpg --batch --yes --passphrase-file /root/.gnupg/linuxadmin -abs -o Release.gpg Release diff --git a/usr/share/mirror/examples/examplerpm/FOOTER.html b/usr/share/mirror/examples/examplerpm/FOOTER.html new file mode 100644 index 0000000..0aeb772 --- /dev/null +++ b/usr/share/mirror/examples/examplerpm/FOOTER.html @@ -0,0 +1,8 @@ + + +Smith122 rpm repository + + +

All contents are licensed under CC BY-SA 4.0.

+ + diff --git a/usr/share/mirror/examples/examplerpm/HEADER.html b/usr/share/mirror/examples/examplerpm/HEADER.html new file mode 100644 index 0000000..274e2ca --- /dev/null +++ b/usr/share/mirror/examples/examplerpm/HEADER.html @@ -0,0 +1,12 @@ + + +Smith122 rpm repository + + +

Smith122 rpm repository

+
+

You can install the smith122rpm.repo in the /etc/yum.repos.d/ directory with this command: +

wget http://albion320.no-ip.biz/smith122/repo/rpm/smith122rpm.repo -O /etc/yum.repos.d/smith122rpm.repo
+
+ + diff --git a/usr/share/mirror/examples/examplerpm/smith122rpm.repo b/usr/share/mirror/examples/examplerpm/smith122rpm.repo new file mode 100644 index 0000000..48bcc9b --- /dev/null +++ b/usr/share/mirror/examples/examplerpm/smith122rpm.repo @@ -0,0 +1,7 @@ +# smith122rpm.repo +# Install with: +# wget http://albion320.no-ip.biz/smith122/repo/rpm/smith122rpm.repo -O /etc/yum.repos.d/smith122rpm.repo +[smith122rpm] +name=smith122rpm +baseurl=http://albion320.no-ip.biz/smith122/repo/rpm/ +gpgcheck=0 diff --git a/usr/share/mirror/examples/examplerpm/update-smith122rpm.sh b/usr/share/mirror/examples/examplerpm/update-smith122rpm.sh new file mode 100755 index 0000000..a6c38a9 --- /dev/null +++ b/usr/share/mirror/examples/examplerpm/update-smith122rpm.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# working directory +repodir=/srv/science/smith122/repo/rpm/ +cd ${repodir} +chmod 0644 *rpm 1>/dev/null 2>&1 +restorecon -RF "${repodir}" + +# create the package index +createrepo . diff --git a/usr/share/mirror/examples/sites/10.1.8.63.conf b/usr/share/mirror/examples/sites/10.1.8.63.conf deleted file mode 100644 index 7afda1b..0000000 --- a/usr/share/mirror/examples/sites/10.1.8.63.conf +++ /dev/null @@ -1,5 +0,0 @@ -# File: /etc/httpd/sites/{ipaddress}.conf -# Package: mirror -# Purpose: A template for the mirror apache listeners. This is probably redundant, but in case it's needed, fix the IP address here and in the filename. -Listen 10.1.8.63:80 -Listen 10.1.8.63:443 diff --git a/usr/share/mirror/examples/sites/mirror.conf b/usr/share/mirror/examples/sites/mirror.conf deleted file mode 100644 index 5f2e761..0000000 --- a/usr/share/mirror/examples/sites/mirror.conf +++ /dev/null @@ -1,65 +0,0 @@ -# File: /etc/httpd/sites/mirror.conf -# Package: mirror -# Title: Apache mirror config -# Purpose: To provide a standard mirror http and https site -# Reference: -# Instructions: -# you can make a simple IP listener conf with the following -# thisip=$( ifconfig 2>/dev/null | awk '/Bcast|broadcast/{print $2}' | tr -cd '[^0-9\.\n]' | head -n1) -# printf "Listen %s\nListen %s" "${thisip}:80" "${thisip}:443" > /etc/httpd/sites/${thisip}.conf -# Be sure to fix the IP addresses here for the virtual hosts. -# Also ensure /etc/hosts has the right hostnames configured for the ssl vhost below -# Document: Below this line - - - - ServerName mirror.example.com:80 - ServerAlias mirror brass mirror-brass mirrorbrass brassmirror *.mirror.example.com brass.example.com - # this server also provides bgscripts.repo at http://mirror.example.com/bgscripts which is /var/www/html/mirror.example.com/bgscripts - - DocumentRoot "/var/www/html/mirror.example.com" - - Alias /mirror /mnt/mirror - - # Index options - Options +Indexes - IndexOptions IgnoreCase FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=* SuppressHTMLPreamble - IndexIgnore FOOTER.html repodata tivoli *.so bgscripts - ReadmeName FOOTER.html - - # Useful additions for the mirror - AddIcon /icons/rpm.png .rpm - AddIcon /icons/repo.png .repo - AddType application/octet-stream .iso - - - AllowOverride None - Order allow,deny - Allow from all - Options Indexes FollowSymLinks - - - # Allows "centos.mirror.example.com" redirection to "mirror.example.com/centos" behavior - RewriteEngine On - RewriteCond %{HTTP_HOST} ^([^.]*)\.mirror\.example\.com$ - RewriteRule /(.*) http://mirror.example.com/%1/$1 [R,L] - - - - - SSLEngine on - SSLProtocol all -SSLv2 -SSLv3 - SSLHonorCipherOrder on - SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA !RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS" - SSLCertificateFile /etc/pki/tls/certs/wildcard.crt - SSLCertificateKeyFile /etc/pki/tls/private/wildcard.key - SSLCACertificateFile /etc/pki/tls/certs/rapidssl.crt - - LogLevel warn - # Reverse proxy all ssl traffic to the nonencrypted site. This is a template for any and all sites. - # Observe that this depends on /etc/hosts or DNS to look up the variable SERVER_NAME - SSLProxyEngine On - RewriteEngine On - RewriteRule ^/(.*)$ http://%{SERVER_NAME}/$1 [P,L] - - diff --git a/usr/share/mirror/examples/sites/mntscripts.conf b/usr/share/mirror/examples/sites/mntscripts.conf deleted file mode 100644 index 31cdc6b..0000000 --- a/usr/share/mirror/examples/sites/mntscripts.conf +++ /dev/null @@ -1,24 +0,0 @@ - - - ServerName mntscripts.example.com:80 - ServerAlias mntscripts scripts scripts.example.com - - DocumentRoot "/var/www/html/mntscripts.example.com" - - AddType application/octet-stream .iso - - #Alias /mirror /mnt/mirror - - Options +Indexes - IndexOptions FancyIndexing NameWidth=* DescriptionWidth=* - IndexIgnore FOOTER.html repodata - ReadmeName FOOTER.html - - - AllowOverride None - Order allow,deny - Allow from all - Options Indexes FollowSymLinks - - - diff --git a/usr/share/mirror/examples/sites/zz_proxy.conf b/usr/share/mirror/examples/sites/zz_proxy.conf index c6221de..fcd666a 100644 --- a/usr/share/mirror/examples/sites/zz_proxy.conf +++ b/usr/share/mirror/examples/sites/zz_proxy.conf @@ -1,28 +1,15 @@ -# File: /etc/httpd/sites/zz_proxy.conf +# File: /usr/share/mirror/examples/sites/zz_proxy.conf Order deny,allow Deny from all # Allow each host or range as desired. - - Allow from 203.0.193.232/255.255.255.255 - Allow from 10.1.9.194/32 - # Whole Linux dev subnet - Allow from 10.1.9.0/24 - # Whole IT-192 network in vmware so I do not have to keep doing this - Allow from 203.0.192.0/23 - # onyx for webtatic - Allow from 10.1.9.121/32 - # company-owned wireless devices subnets - Allow from 10.48.0.0/16 - # personally-owned wireless devices - Allow from 10.21.0.0/16 - + Allow from 192.168.1.0/24 -Listen 10.1.8.63:8090 - +Listen 192.168.1.11:8090 + - ServerName junk.example.com:8080 + ServerName junk.albion320.no-ip.biz:8090 ServerAlias * DocumentRoot /var/www/html/notfound diff --git a/usr/share/mirror/inc/get-files b/usr/share/mirror/inc/get-files new file mode 100755 index 0000000..8ad528b --- /dev/null +++ b/usr/share/mirror/inc/get-files @@ -0,0 +1,36 @@ +#!/bin/sh +# File: get-files +case "${1}" in + rpm) + +### for rpm +find * -type d \ + \( \ + -regex 'usr\/share\/mirror.*' \ + -o -regex 'etc\/mirror.*' \ + \) \ + | sed -e 's/^/%dir \//;' +find * -mindepth 1 ! -name "${package}.spec.$$.swp" \ + ! -type d \ + ! -regex '.*.swp' \ + ! -regex '.*?DEBIAN.*?' \ + | sed -e ' +s/^/\//; +s/\(.*\.txt\)/%doc %attr(444, -, -) \1/; +s/\(.*\.\(conf\|cron\)\|.*sudoers\.d\|\/usr\/share\/mirror\/scripts\/.\+\)/%config \1/; +s/\(.*bin.*\)/%verify(link) \1/; +s/\(.*\)\.py$/\1\.py\n\1\.pyc\n\1\.pyo/; +' + ;; + deb) + +### for deb +# will be redirected to md5sum +echo "Error: Unh. Feature not yet implemented. Aborted." && exit 1 + + ;; + *) + echo "FATAL ERROR: check ./pack or get-files. Please use [ rpm | deb ] option. Aborted." 1>&2 + exit 1 + ;; +esac diff --git a/usr/share/mirror/inc/get-files-core b/usr/share/mirror/inc/get-files-core new file mode 100755 index 0000000..a3feb42 --- /dev/null +++ b/usr/share/mirror/inc/get-files-core @@ -0,0 +1,43 @@ +#!/bin/sh +# File: get-files-core +case "${1}" in + rpm) + +### for rpm +find * -type d \ + -regex 'usr\/share\/bgscripts.*' \ + ! -regex '.*icons.*' \ + | sed -e 's/^/%dir \//;' +find * -mindepth 1 ! -name "${package}.spec.$$.swp" \ + ! -type d \ + ! -regex '.*.swp' \ + ! -regex '.*?DEBIAN.*?' \ + ! -regex '.*\/rdp.*' ! -regex '.*rdp\..*' \ + ! -regex '.*get-files$' \ + ! -regex '.*icons.*' \ + | sed -e ' +s/^/\// +s/\(.*\.txt\)/%doc %attr(444, -, -) \1/ +s/\(.*bin.*\)/%verify(link) \1/ +s/\(.*\)\.py$/\1\.py\n\1\.pyc\n\1\.pyo/ +s/\(.*\.conf\)/%config %attr(666, -, -) \1/ +' + + ;; + deb) + +### for deb +find . -mindepth 1 ! -name "${package}.spec.$$.swp" \ + ! -type d \ + ! -regex '.*?DEBIAN.*' ! -regex '.*?.swp' ! -regex '.*\.git.*' \ + ! -regex '.*\/rdp.*' ! -regex '.*rdp\..*' \ + ! -regex '.*get-files$' \ + ! -regex '.*icons.*' \ + -printf '%P ' + + ;; + *) + echo "FATAL ERROR: check ./pack or get-files-core. Please use [ rpm | deb ] option. Aborted." 1>&2 + exit 1 + ;; +esac diff --git a/usr/share/mirror/inc/localize_git.sh b/usr/share/mirror/inc/localize_git.sh index abf997a..a522f50 100755 --- a/usr/share/mirror/inc/localize_git.sh +++ b/usr/share/mirror/inc/localize_git.sh @@ -1,2 +1,2 @@ #!/bin/sh -\cp -pRf /home/work/mirror.clean/.git /home/bgstack15/rpmbuild/SOURCES/mirror-1.0-9/ +\cp -pRf /home/work/mirror.clean/.git /home/bgstack15/rpmbuild/SOURCES/mirror-1.1-3/ diff --git a/usr/share/mirror/inc/pack b/usr/share/mirror/inc/pack index fb17d85..733630e 100755 --- a/usr/share/mirror/inc/pack +++ b/usr/share/mirror/inc/pack @@ -13,13 +13,12 @@ type=""; case "${thisflavor}" in redhat|rhel|centos|fedora|korora) type=rpm;; debian|ubuntu) type=dpkg;; - *) type=targz;; -esac + *) type=targz;; esac echo " $@ " | grep -qiE -- "help|usage|\s-h\s|\s-\?" 1>/dev/null 2>&1 && { # display help and exit less -F <> "${rpmbuilddir}/SOURCES/${packagespecfile}" -rm -rf "${rpmbuilddir}/SOURCES/${package}-${shortversion}" -cp -prf "${rpmbuilddir}/SOURCES/${package}-${version}" "${rpmbuilddir}/SOURCES/${package}-${shortversion}" +"${rpmbuilddir}/SOURCES/${package}-${version}/usr/share/${package}/inc/get-files" rpm >> "${rpmbuilddir}/SOURCES/${packagespecfile}" +rm -rf "${rpmbuilddir}/SOURCES/${package}-${shortversion}"; cp -prf "${rpmbuilddir}/SOURCES/${package}-${version}" "${rpmbuilddir}/SOURCES/${package}-${shortversion}" rm -rf "${rpmbuilddir}/SOURCES/${package}-${shortversion}/DEBIAN" cd "${rpmbuilddir}/SOURCES" -rm -rf "${package}.tgz"; tar -zc --exclude='.git' -f "${package}.tgz" "${package}-${shortversion}" && rm -rf "${rpmbuilddir}/SOURCES/${package}-${shortversion}/" +rm -rf "${package}.tgz"; tar -zc --exclude='.git' --exclude='README.md' -f "${package}.tgz" "${package}-${shortversion}" cp -p "${rpmbuilddir}/SOURCES/${packagespecfile}" "${rpmbuilddir}/SPECS" -cd "${rpmbuilddir}/RPMS/noarch" +mkdir -p "${rpmbuilddir}/RPMS/noarch"; cd "${rpmbuilddir}/RPMS/noarch" 2>/dev/null rpmbuild -bb "${rpmbuilddir}/SPECS/${package}.spec" -rm -rf "${rpmbuilddir}/SOURCES/${package}.tgz" +rm -rf "${rpmbuilddir}/SOURCES/${package}-${shortversion}/" "${rpmbuilddir}/SOURCES/${package}.tgz" ;; dpkg) diff --git a/usr/share/mirror/inc/rsync b/usr/share/mirror/inc/rsync index 710ecb7..47fe881 100644 --- a/usr/share/mirror/inc/rsync +++ b/usr/share/mirror/inc/rsync @@ -1,7 +1,7 @@ #!/bin/sh # # rsync: Specific functions and options for rsync use -# Original source may be from David Lowry but is uncertain. +# Original source is uknown. #RSYNCOPTIONS="--delete-during -l -p -r -t -v" RSYNCOPTIONS="-rlptv --del" diff --git a/usr/share/mirror/inc/scrub.txt b/usr/share/mirror/inc/scrub.txt index 72d4e35..45fb831 100644 --- a/usr/share/mirror/inc/scrub.txt +++ b/usr/share/mirror/inc/scrub.txt @@ -1,5 +1,5 @@ # for scrubpy version 2016-11-16a or newer -source /home/bgstack15/rpmbuild/SOURCES/mirror-1.0-9 +source /home/bgstack15/rpmbuild/SOURCES/mirror-1.1-3 target /home/work/mirror.clean ignore "tgz png gif jpg pyc pyo git swp ico" # rest of the lines are "OLD WORD" "NEW WORD" @@ -12,18 +12,3 @@ bname bname STACK15 STACK15 Stack15 Stack15 stack15 stack15 -Alice Alice -alice alice -User1 User1 -user1 user1 -Luser1 Auser1 -luser1 auser1 -EXAMPLE EXAMPLE -example example -".COM" ".COM" -".com" ".com" -"203.0." "203.0." -SMITH123 SMITH123 -Smith123 Smith123 -smith123 smith123 -one one diff --git a/usr/share/mirror/mirror-master.sh b/usr/share/mirror/mirror-master.sh index 8c7f33e..4e5334b 100755 --- a/usr/share/mirror/mirror-master.sh +++ b/usr/share/mirror/mirror-master.sh @@ -13,7 +13,7 @@ # 2017-02-06 rearranged mirror package to FHS 3.0 # Usage: Call in cron every day # Reference: ftemplate.sh 2015-11-23a; framework.sh 2015-11-23a -# mirror.luser1 (2014-11-11) +# mirror.lcroce (2014-11-11) # Improve: fiversion="2015-11-23a" mirrormasterversion="2017-02-06a" diff --git a/usr/share/mirror/scripts/centos b/usr/share/mirror/scripts/centos old mode 100755 new mode 100644 diff --git a/usr/share/mirror/scripts/fedora-epel b/usr/share/mirror/scripts/fedora-epel old mode 100755 new mode 100644 diff --git a/usr/share/mirror/scripts/fedora-releases b/usr/share/mirror/scripts/fedora-releases old mode 100755 new mode 100644 diff --git a/usr/share/mirror/scripts/fedora-updates b/usr/share/mirror/scripts/fedora-updates old mode 100755 new mode 100644 diff --git a/usr/share/mirror/scripts/libreoffice b/usr/share/mirror/scripts/libreoffice old mode 100755 new mode 100644 diff --git a/usr/share/mirror/scripts/linuxmint-isos b/usr/share/mirror/scripts/linuxmint-isos old mode 100755 new mode 100644 diff --git a/usr/share/mirror/scripts/linuxmint-repos b/usr/share/mirror/scripts/linuxmint-repos old mode 100755 new mode 100644 diff --git a/usr/share/mirror/scripts/putty b/usr/share/mirror/scripts/putty old mode 100755 new mode 100644 diff --git a/usr/share/mirror/scripts/rsyslog b/usr/share/mirror/scripts/rsyslog old mode 100755 new mode 100644 diff --git a/usr/share/mirror/scripts/ssh b/usr/share/mirror/scripts/ssh old mode 100755 new mode 100644 diff --git a/usr/share/mirror/scripts/ubuntu b/usr/share/mirror/scripts/ubuntu old mode 100755 new mode 100644 diff --git a/usr/share/mirror/scripts/ubuntu-releases b/usr/share/mirror/scripts/ubuntu-releases old mode 100755 new mode 100644 -- cgit