Skip to content

Commit

Permalink
Homegrown s3 based blog management (inspired by git-sym)
Browse files Browse the repository at this point in the history
  • Loading branch information
masonkatz committed Aug 21, 2017
1 parent 900e34b commit 03fb6c1
Show file tree
Hide file tree
Showing 8 changed files with 116 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -9,3 +9,4 @@
.DS_Store
roll-*.xml
.*.swp
/3rdparty/
5 changes: 5 additions & 0 deletions 3rdparty.md
@@ -0,0 +1,5 @@
# Third Party Resources

This repository includes the following code from other projects.

* MegaCli-8.07.07-1.noarch.rpm [https://teradata-stacki.s3.amazonaws.com/3rdparty/MegaCli-8.07.07-1.noarch.rpm]
49 changes: 49 additions & 0 deletions LICENSE-ROCKS.txt
@@ -0,0 +1,49 @@

Rocks(r)
www.rocksclusters.org
version 5.4 (Maverick)

Copyright (c) 2000 - 2010 The Regents of the University of California.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice unmodified and in its entirety, this list of conditions and the
following disclaimer in the documentation and/or other materials provided
with the distribution.

3. All advertising and press materials, printed or electronic, mentioning
features or use of this software must display the following acknowledgement:

"This product includes software developed by the Rocks(r)
Cluster Group at the San Diego Supercomputer Center at the
University of California, San Diego and its contributors."

4. Except as permitted for the purposes of acknowledgment in paragraph 3,
neither the name or logo of this software nor the names of its
authors may be used to endorse or promote products derived from this
software without specific prior written permission. The name of the
software includes the following terms, and any derivatives thereof:
"Rocks", "Rocks Clusters", and "Avalanche Installer". For licensing of
the associated name, interested parties should contact Technology
Transfer & Intellectual Property Services, University of California,
San Diego, 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910,
Ph: (858) 534-5815, FAX: (858) 534-7345, E-MAIL:invent@ucsd.edu

THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS
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.
9 changes: 5 additions & 4 deletions Makefile
Expand Up @@ -9,6 +9,10 @@ ROLLROOT = .
-include $(ROLLSBUILD)/etc/CCRolls.mk
-include version-$(ARCH).mk

.PHONY: 3rdparty
3rdparty:
$(ROLLSBUILD)/bin/get3rdparty.py

GROUPS=developer-workstation-environment \
compat-libraries development

Expand All @@ -34,11 +38,8 @@ $(PACKAGES):

ospackages: $(GROUPS) $(PACKAGES)

bootstrap: ospackages
bootstrap: 3rdparty ospackages
$(MAKE) -C src/stack/build $@
. /etc/profile.d/stack-build.sh
$(MAKE) -C src $@

LICENSE.all.txt:
cat LICENSE.txt > $@
find src -name LICENSE.txt -exec cat {} \; >> $@
1 change: 1 addition & 0 deletions manifest.3rdparty
@@ -0,0 +1 @@
MegaCli-8.07.07-1.noarch.rpm
Binary file removed src/foundation/MegaCLI/MegaCli-8.07.07-1.noarch.rpm
Binary file not shown.
1 change: 1 addition & 0 deletions src/foundation/MegaCLI/MegaCli-8.07.07-1.noarch.rpm
55 changes: 55 additions & 0 deletions src/stack/build/build/src/pallet/bin/get3rdparty.py
@@ -0,0 +1,55 @@
#!/opt/stack/bin/python3
#
# @SI_Copyright@
# @SI_Copyright@

import os
import sys
import subprocess

urlbase = 'https://teradata-stacki.s3.amazonaws.com/3rdparty'
manifest = 'manifest.3rdparty'
cachedir = '3rdparty'
docfile = '3rdparty.md'
resources = { }

if not os.path.exists(manifest):
print('Cannot file manifest.3rdparty file')
sys.exit(0)

if not os.path.exists(cachedir):
os.mkdir(cachedir)

fin = open(manifest, 'r')
for line in fin.readlines():
resource = line.strip()
resources[resource] = os.path.join(urlbase, resource)
fin.close()

for resource in resources:
target = os.path.join(cachedir, resource)
if not os.path.exists(target):
print('download %s\n\t%s' % (resource, resources[resource]))
subprocess.call([ 'curl',
'-sSo%s' % target,
resources[resource] ])

fout = open(docfile, 'w')
fout.write("""# Third Party Resources
This repository includes the following code from other projects.
""")
for resource in resources:
fout.write('* %s [%s]\n' % (resource, resources[resource]))

fout.close()









13 changes: 0 additions & 13 deletions src/stack/build/build/src/pallet/etc/CCRolls.mk
Expand Up @@ -24,17 +24,4 @@ nuke.all:: nuke
manifest-check:
$(ROLLSBUILD)/bin/manifest-check.py $(ROLL) build-$(ROLL)-$(STACK)

# Build 3rdparty directory

.PHONY: 3rdparty
3rdparty: manifest.src
-mkdir $(REDHAT.ROOT)/3rdparty
( \
for file in `cat manifest.src`; do \
if [ -f $$file ]; then \
cp $$file $(REDHAT.ROOT)/3rdparty/; \
fi; \
done \
)

endif # __CCROLLS_MK

0 comments on commit 03fb6c1

Please sign in to comment.