diff options
author | Ernie Hershey <ernie.hershey@10gen.com> | 2013-12-09 20:48:17 -0500 |
---|---|---|
committer | Ernie Hershey <ernie.hershey@10gen.com> | 2014-02-11 07:26:13 -0500 |
commit | cc950771c0b7975be18b373f3e4fd009bccc606f (patch) | |
tree | 4a4f84f1dc8abb84f07393683acfc82c1c49d8f3 | |
parent | b5f67b6a6aec989aec7c01fd445b25c5804f9016 (diff) | |
download | mongo-cc950771c0b7975be18b373f3e4fd009bccc606f.tar.gz |
SERVER-9123 Include snmp files in enterprise packages
-rwxr-xr-x | buildscripts/packager-enterprise.py | 21 | ||||
-rw-r--r-- | debian/mongodb-enterprise-server.docs | 8 | ||||
-rw-r--r-- | debian/mongodb-enterprise-unstable-server.docs | 8 | ||||
-rw-r--r-- | debian/mongodb-enterprise-unstable.rules | 8 | ||||
-rw-r--r-- | debian/mongodb-enterprise.rules | 8 | ||||
-rw-r--r-- | rpm/mongodb-enterprise-unstable.spec | 11 | ||||
-rw-r--r-- | rpm/mongodb-enterprise.spec | 10 |
7 files changed, 51 insertions, 23 deletions
diff --git a/buildscripts/packager-enterprise.py b/buildscripts/packager-enterprise.py index 3824afedf62..9bf0eb057b5 100755 --- a/buildscripts/packager-enterprise.py +++ b/buildscripts/packager-enterprise.py @@ -50,12 +50,6 @@ ARCHES=["x86_64"] # Made up names for the flavors of distribution we package for. DISTROS=["ubuntu-upstart", "redhat"] -# When we're preparing a directory containing packaging tool inputs -# and our binaries, use this relative subdirectory for placing the -# binaries. -BINARYDIR="BINARIES" - -sys.stderr.write("BINARYDIR: %s, REPOPATH: %s\n" % (BINARYDIR, REPOPATH)) class Spec(object): def __init__(self, specstr): @@ -305,8 +299,9 @@ def unpack_binaries_into(build_os, arch, spec, where): # thing and chdir into where and run tar there. os.chdir(where) try: - sysassert(["tar", "xvzf", rootdir+"/"+tarfile(build_os, arch, spec), "mongodb-linux-%s-enterprise-%s-%s/bin" % (arch, build_os, spec.version())]) - os.rename("mongodb-linux-%s-enterprise-%s-%s/bin" % (arch, build_os, spec.version()), "bin") + sysassert(["tar", "xvzf", rootdir+"/"+tarfile(build_os, arch, spec), "mongodb-linux-%s-enterprise-%s-%s/" % (arch, build_os, spec.version())]) + for releasefile in "bin", "snmp", "LICENSE.txt", "README", "THIRD-PARTY-NOTICES": + os.rename("mongodb-linux-%s-enterprise-%s-%s/%s" % (arch, build_os, spec.version(), releasefile), releasefile) os.rmdir("mongodb-linux-%s-enterprise-%s-%s" % (arch, build_os, spec.version())) except Exception: exc=sys.exc_value @@ -328,15 +323,15 @@ def make_package(distro, build_os, arch, spec, srcdir): print "Copying packaging files from %s to %s" % ("%s/%s" % (srcdir, pkgdir), sdir) # FIXME: sh-dash-cee is bad. See if tarfile can do this. sysassert(["sh", "-c", "(cd \"%s\" && git archive r%s %s/ ) | (cd \"%s\" && tar xvf -)" % (srcdir, spec.version(), pkgdir, sdir)]) - # Splat the binaries under sdir. The "build" stages of the - # packaging infrastructure will move the binaries to wherever they + # Splat the binaries and snmp files under sdir. The "build" stages of the + # packaging infrastructure will move the files to wherever they # need to go. - unpack_binaries_into(build_os, arch, spec, sdir+("%s/usr/"%BINARYDIR)) + unpack_binaries_into(build_os, arch, spec, sdir) # Remove the mongosniff binary due to libpcap dynamic # linkage. FIXME: this removal should go away # eventually. - if os.path.exists(sdir+("%s/usr/bin/mongosniff"%BINARYDIR)): - os.unlink(sdir+("%s/usr/bin/mongosniff"%BINARYDIR)) + if os.path.exists(sdir + "bin/mongosniff"): + os.unlink(sdir + "bin/mongosniff") return distro.make_pkg(build_os, arch, spec, srcdir) def make_repo(repodir): diff --git a/debian/mongodb-enterprise-server.docs b/debian/mongodb-enterprise-server.docs new file mode 100644 index 00000000000..862a424eb58 --- /dev/null +++ b/debian/mongodb-enterprise-server.docs @@ -0,0 +1,8 @@ +snmp/mongod.conf.master +snmp/mongod.conf.subagent +snmp/README-snmp.txt +snmp/MONGOD-MIB.txt +snmp/MONGODBINC-MIB.txt +LICENSE.txt +README +THIRD-PARTY-NOTICES diff --git a/debian/mongodb-enterprise-unstable-server.docs b/debian/mongodb-enterprise-unstable-server.docs new file mode 100644 index 00000000000..862a424eb58 --- /dev/null +++ b/debian/mongodb-enterprise-unstable-server.docs @@ -0,0 +1,8 @@ +snmp/mongod.conf.master +snmp/mongod.conf.subagent +snmp/README-snmp.txt +snmp/MONGOD-MIB.txt +snmp/MONGODBINC-MIB.txt +LICENSE.txt +README +THIRD-PARTY-NOTICES diff --git a/debian/mongodb-enterprise-unstable.rules b/debian/mongodb-enterprise-unstable.rules index 00103176340..a2c9351e8d5 100644 --- a/debian/mongodb-enterprise-unstable.rules +++ b/debian/mongodb-enterprise-unstable.rules @@ -81,13 +81,13 @@ install: build mkdir -p $(CURDIR)/debian/mongodb-enterprise-unstable-server/usr/bin mkdir -p $(CURDIR)/debian/mongodb-enterprise-unstable-mongos/usr/bin mkdir -p $(CURDIR)/debian/mongodb-enterprise-unstable-tools/usr/bin - cp -v $(CURDIR)/BINARIES/usr/bin/mongo $(CURDIR)/debian/mongodb-enterprise-unstable-shell/usr/bin - cp -v $(CURDIR)/BINARIES/usr/bin/mongod $(CURDIR)/debian/mongodb-enterprise-unstable-server/usr/bin - cp -v $(CURDIR)/BINARIES/usr/bin/mongos $(CURDIR)/debian/mongodb-enterprise-unstable-mongos/usr/bin + cp -v $(CURDIR)/bin/mongo $(CURDIR)/debian/mongodb-enterprise-unstable-shell/usr/bin + cp -v $(CURDIR)/bin/mongod $(CURDIR)/debian/mongodb-enterprise-unstable-server/usr/bin + cp -v $(CURDIR)/bin/mongos $(CURDIR)/debian/mongodb-enterprise-unstable-mongos/usr/bin for binary in ${TOOLS} ; \ do \ - cp -v $(CURDIR)/BINARIES/usr/bin/$$binary $(CURDIR)/debian/mongodb-enterprise-unstable-tools/usr/bin ; \ + cp -v $(CURDIR)/bin/$$binary $(CURDIR)/debian/mongodb-enterprise-unstable-tools/usr/bin ; \ done mkdir -p $(CURDIR)/debian/mongodb-enterprise-unstable-server/etc diff --git a/debian/mongodb-enterprise.rules b/debian/mongodb-enterprise.rules index c10a95f564a..97ba328f00f 100644 --- a/debian/mongodb-enterprise.rules +++ b/debian/mongodb-enterprise.rules @@ -80,13 +80,13 @@ install: build mkdir -p $(CURDIR)/debian/mongodb-enterprise-server/usr/bin mkdir -p $(CURDIR)/debian/mongodb-enterprise-mongos/usr/bin mkdir -p $(CURDIR)/debian/mongodb-enterprise-tools/usr/bin - cp -v $(CURDIR)/BINARIES/usr/bin/mongo $(CURDIR)/debian/mongodb-enterprise-shell/usr/bin - cp -v $(CURDIR)/BINARIES/usr/bin/mongod $(CURDIR)/debian/mongodb-enterprise-server/usr/bin - cp -v $(CURDIR)/BINARIES/usr/bin/mongos $(CURDIR)/debian/mongodb-enterprise-mongos/usr/bin + cp -v $(CURDIR)/bin/mongo $(CURDIR)/debian/mongodb-enterprise-shell/usr/bin + cp -v $(CURDIR)/bin/mongod $(CURDIR)/debian/mongodb-enterprise-server/usr/bin + cp -v $(CURDIR)/bin/mongos $(CURDIR)/debian/mongodb-enterprise-mongos/usr/bin for binary in ${TOOLS} ; \ do \ - cp -v $(CURDIR)/BINARIES/usr/bin/$$binary $(CURDIR)/debian/mongodb-enterprise-tools/usr/bin ; \ + cp -v $(CURDIR)/bin/$$binary $(CURDIR)/debian/mongodb-enterprise-tools/usr/bin ; \ done mkdir -p $(CURDIR)/debian/mongodb-enterprise-server/etc diff --git a/rpm/mongodb-enterprise-unstable.spec b/rpm/mongodb-enterprise-unstable.spec index f3c8b91c086..dfe077e79b7 100644 --- a/rpm/mongodb-enterprise-unstable.spec +++ b/rpm/mongodb-enterprise-unstable.spec @@ -79,7 +79,7 @@ to develop mongo client software. %install mkdir -p $RPM_BUILD_ROOT/usr -cp -rv BINARIES/usr/bin $RPM_BUILD_ROOT/usr +cp -rv bin $RPM_BUILD_ROOT/usr mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1 cp debian/*.1 $RPM_BUILD_ROOT/usr/share/man/man1/ # FIXME: remove this rm when mongosniff is back in the package @@ -96,6 +96,7 @@ mkdir -p $RPM_BUILD_ROOT/var/log/mongodb mkdir -p $RPM_BUILD_ROOT/var/run/mongodb touch $RPM_BUILD_ROOT/var/log/mongodb/mongod.log + %clean rm -rf $RPM_BUILD_ROOT @@ -138,6 +139,14 @@ fi %attr(0755,mongodb,mongodb) %dir /var/log/mongodb %attr(0755,mongodb,mongodb) %dir /var/run/mongodb %attr(0640,mongodb,mongodb) %config(noreplace) %verify(not md5 size mtime) /var/log/mongodb/mongod.log +%doc snmp/MONGOD-MIB.txt +%doc snmp/MONGODBINC-MIB.txt +%doc snmp/mongod.conf.master +%doc snmp/mongod.conf.subagent +%doc snmp/README-snmp.txt +%doc LICENSE.txt +%doc README +%doc THIRD-PARTY-NOTICES %files shell %defattr(-,root,root,-) diff --git a/rpm/mongodb-enterprise.spec b/rpm/mongodb-enterprise.spec index 15e77b904f1..1129abf1f5b 100644 --- a/rpm/mongodb-enterprise.spec +++ b/rpm/mongodb-enterprise.spec @@ -77,7 +77,7 @@ to develop mongo client software. %install mkdir -p $RPM_BUILD_ROOT/usr -cp -rv BINARIES/usr/bin $RPM_BUILD_ROOT/usr +cp -rv bin $RPM_BUILD_ROOT/usr mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1 cp debian/*.1 $RPM_BUILD_ROOT/usr/share/man/man1/ # FIXME: remove this rm when mongosniff is back in the package @@ -93,6 +93,14 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/mongodb mkdir -p $RPM_BUILD_ROOT/var/log/mongodb mkdir -p $RPM_BUILD_ROOT/var/run/mongodb touch $RPM_BUILD_ROOT/var/log/mongodb/mongod.log +%doc snmp/MONGOD-MIB.txt +%doc snmp/MONGODBINC-MIB.txt +%doc snmp/mongod.conf.master +%doc snmp/mongod.conf.subagent +%doc snmp/README-snmp.txt +%doc LICENSE.txt +%doc README +%doc THIRD-PARTY-NOTICES %clean rm -rf $RPM_BUILD_ROOT |