Author: gnichols Date: 2011-06-15 19:44:01 +0000 (Wed, 15 Jun 2011) New Revision: 956
Added: trunk/server/ trunk/v7-server.spec.in Removed: trunk/test-env/www/ Modified: trunk/Makefile trunk/docs/man/Makefile trunk/server/Makefile trunk/server/cgi/Makefile trunk/server/cgi/v7.conf trunk/server/cgi/v7xml.py trunk/server/cgi/xsl/Makefile trunk/server/css/Makefile trunk/server/images/Makefile trunk/test-env/Makefile trunk/tools/v7-release.py trunk/v7.spec.in Log: 702695 - v7 server should have it's own package
Modified: trunk/Makefile =================================================================== --- trunk/Makefile 2011-06-15 19:41:25 UTC (rev 955) +++ trunk/Makefile 2011-06-15 19:44:01 UTC (rev 956) @@ -14,7 +14,7 @@ # Author: Greg Nichols
V7_VERSION := 1.4 -V7_RELEASE := 0 +V7_RELEASE := 1 V7_VERSION_RELEASE := $(V7_VERSION)-$(V7_RELEASE) V7_VERSION_PY := v7/version.py V7_SVN_MODULE := svn+ssh://svn.fedorahosted.org/svn/v7 @@ -50,7 +50,11 @@ mkdir -p $(DESTDIR)/var/v7 mkdir -p $(DESTDIR)/var/v7/docs for i in $(SUBDIRS); do $(MAKE) -C $$i DESTDIR=$(DESTDIR) V7_VERSION=$(V7_VERSION) V7_RELEASE=$(V7_RELEASE) V7_RHEL_VERSION=$(V7_RHEL_VERSION) install; done - for i in $(SUBDIRS); do $(MAKE) -C $$i DESTDIR=$(DESTDIR) V7_VERSION=$(V7_VERSION) V7_RELEASE=$(V7_RELEASE) install; done + +install-server: + mkdir -p $(DESTDIR)/var/www/v7 + mkdir -p $(DESTDIR)/var/www/v7/docs + $(MAKE) -C server DESTDIR=$(DESTDIR) V7_VERSION=$(V7_VERSION) V7_RELEASE=$(V7_RELEASE) V7_RHEL_VERSION=$(V7_RHEL_VERSION) install-server
clean: $(MAKE) -C tests clean @@ -66,7 +70,10 @@
v7-$(V7_VERSION_RELEASE).el$(V7_RHEL_VERSION).tar.bz2: /tmp/v7/exclude v7.spec - tar cjS -f $@ -X /tmp/v7/exclude --exclude $@ * + tar cjS -f $@ -X /tmp/v7/exclude --exclude $@ --exclude test-env/www * + +v7-server-$(V7_VERSION_RELEASE).el$(V7_RHEL_VERSION).tar.bz2: /tmp/v7/exclude v7.spec + tar cjS -f $@ -X /tmp/v7/exclude --exclude $@ Makefile test-env/Makefile test-env/www
/tmp/v7/exclude: @@ -81,16 +88,23 @@
v7.spec: v7.spec.in Makefile cat $< | sed -e 's/@V7_VERSION@/$(V7_VERSION)/g' -e 's/@V7_RELEASE@/$(V7_RELEASE)/g' -e 's/@V7_RHEL_VERSION@/$(V7_RHEL_VERSION)/g'> $@ + +v7-server.spec: v7-server.spec.in Makefile + cat $< | sed -e 's/@V7_VERSION@/$(V7_VERSION)/g' -e 's/@V7_RELEASE@/$(V7_RELEASE)/g' -e 's/@V7_RHEL_VERSION@/$(V7_RHEL_VERSION)/g'> $@
-rpm-prep: v7-$(V7_VERSION_RELEASE).el$(V7_RHEL_VERSION).tar.bz2 v7.spec +rpm-prep: v7-$(V7_VERSION_RELEASE).el$(V7_RHEL_VERSION).tar.bz2 v7-server-$(V7_VERSION_RELEASE).el$(V7_RHEL_VERSION).tar.bz2 v7.spec v7-server.spec rm -rf rpm mkdir -p rpm/{BUILD,RPMS,SRPMS,SOURCES,SPECS} cp v7-$(V7_VERSION_RELEASE).el$(V7_RHEL_VERSION).tar.bz2 rpm/SOURCES/ + cp v7-server-$(V7_VERSION_RELEASE).el$(V7_RHEL_VERSION).tar.bz2 rpm/SOURCES/ cp v7.spec rpm/SPECS + cp v7-server.spec rpm/SPECS
srpm: rpm-prep rpmbuild --define "_topdir $(HERE)/rpm" -bs rpm/SPECS/v7.spec + rpmbuild --define "_topdir $(HERE)/rpm" -bs rpm/SPECS/v7-server.spec
rpm: rpm-prep rpmbuild --define "_topdir $(HERE)/rpm" -ba rpm/SPECS/v7.spec + rpmbuild --define "_topdir $(HERE)/rpm" -ba rpm/SPECS/v7-server.spec
Modified: trunk/docs/man/Makefile =================================================================== --- trunk/docs/man/Makefile 2011-06-15 19:41:25 UTC (rev 955) +++ trunk/docs/man/Makefile 2011-06-15 19:44:01 UTC (rev 956) @@ -13,7 +13,7 @@ # # Author: Greg Nichols
-.PHONY: clean install +.PHONY: clean install install-server
clean: @@ -28,6 +28,8 @@ cat v7.8.in | sed -e 's/@V7_VERSION@/$(V7_VERSION)/g' -e 's/@V7_RELEASE@/$(V7_RELEASE)/g' > v7.8 mkdir -p $(DESTDIR)/usr/share/man/man8 gzip v7.8 -c > $(DESTDIR)/usr/share/man/man8/v7.8.gz + +install-server: mkdir -p $(DESTDIR)/var/v7/docs if test -s /usr/bin/man2html; then /usr/bin/man2html v7.8 > $(DESTDIR)/var/v7/docs/index.html; fi
Modified: trunk/server/Makefile =================================================================== --- trunk/test-env/www/Makefile 2011-06-08 15:39:45 UTC (rev 953) +++ trunk/server/Makefile 2011-06-15 19:44:01 UTC (rev 956) @@ -13,7 +13,7 @@ # # Author: Bill Peck
-.PHONY: clean install +.PHONY: clean install-server server
V7_CATALOG_CCS_REPO := https://svn.devel.redhat.com/repos/hwcert-catalog/branches/catalog-v3.6-0.1/... V7_CATALOG_CSS_COPY := $(shell pwd)/catalog-css @@ -24,10 +24,10 @@ # catalogcss: # svn co $(V7_CATALOG_CCS_REPO) $(V7_CATALOG_CSS_COPY)
-install: +install-server: for i in $(SUBDIRS); do $(MAKE) -C $$i V7_CATALOG_CSS_COPY=$(V7_CATALOG_CSS_COPY) install; done - for file in $(FILES); do cp -f $$file $(DESTDIR)/var/v7/$$file; done - chcon -R root:object_r:httpd_sys_content_t $(DESTDIR)/var/v7 + for file in $(FILES); do cp -f $$file $(DESTDIR)/var/www/v7/$$file; done + chcon -R root:object_r:httpd_sys_content_t $(DESTDIR)/var/www/v7
clean: for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
Modified: trunk/server/cgi/Makefile =================================================================== --- trunk/test-env/www/cgi/Makefile 2011-06-08 15:39:45 UTC (rev 953) +++ trunk/server/cgi/Makefile 2011-06-15 19:44:01 UTC (rev 956) @@ -18,17 +18,18 @@
FILES := v7web.py v7xml.py networkTest.py SUBDIRS := xsl +V7_SERVER_ROOT := /var/www/v7
clean: for i in $(SUBDIRS); do $(MAKE) -C $$i; done - rm -rf $(DESTDIR)/var/v7/cgi + rm -rf $(DESTDIR)$(V7_SERVER_ROOT)/cgi rm -rf $(DESTDIR)/etc/httpd/conf.d/v7.conf
all install: - rm -rf $(DESTDIR)/var/v7/cgi - mkdir -p $(DESTDIR)/var/v7/cgi - mkdir -p $(DESTDIR)/var/v7/store - for file in $(FILES); do cp -f $$file $(DESTDIR)/var/v7/cgi/$$file; done + rm -rf $(DESTDIR)$(V7_SERVER_ROOT)/cgi + mkdir -p $(DESTDIR)$(V7_SERVER_ROOT)/cgi + mkdir -p $(DESTDIR)$(V7_SERVER_ROOT)/store + for file in $(FILES); do cp -f $$file $(DESTDIR)$(V7_SERVER_ROOT)/cgi/$$file; done for i in $(SUBDIRS); do $(MAKE) -C $$i V7_CATALOG_CSS_COPY=$(V7_CATALOG_CSS_COPY) install; done mkdir -p $(DESTDIR)/etc/httpd/conf.d cp -f v7.conf $(DESTDIR)/etc/httpd/conf.d/.
Modified: trunk/server/cgi/v7.conf =================================================================== --- trunk/test-env/www/cgi/v7.conf 2011-06-08 15:39:45 UTC (rev 953) +++ trunk/server/cgi/v7.conf 2011-06-15 19:44:01 UTC (rev 956) @@ -1,13 +1,13 @@ -ScriptAlias /v7/cgi/ "/var/v7/cgi/" -<Directory "/var/v7/cgi"> +ScriptAlias /v7/cgi/ "/var/www/v7/cgi/" +<Directory "/var/www/v7/cgi"> AllowOverride None Options None Order allow,deny Allow from all </Directory>
-Alias /v7/ "/var/v7/" -<Directory "/var/v7/"> +Alias /v7/ "/var/www/v7/" +<Directory "/var/www/v7/"> Options Indexes FollowSymlinks Order allow,deny Allow from all
Modified: trunk/server/cgi/v7xml.py =================================================================== --- trunk/test-env/www/cgi/v7xml.py 2011-06-08 15:39:45 UTC (rev 953) +++ trunk/server/cgi/v7xml.py 2011-06-15 19:44:01 UTC (rev 956) @@ -20,6 +20,7 @@ v7ClassLibraryPath = '/usr/share/v7/lib/' sys.path.append(v7ClassLibraryPath) os.putenv("PYTHONPATH", v7ClassLibraryPath) +v7ServerRoot = '/var/www/v7'
from v7.environment import Environment
@@ -43,7 +44,7 @@
def doTransform(parameters): - xslt = etree.parse("/var/v7/xsl/%s.xsl" % parameters["sheet"]) + xslt = etree.parse("%s/xsl/%s.xsl" % (v7ServerRoot, parameters["sheet"])) transform = etree.XSLT(xslt) results = etree.parse(environment.getResultsPath()) output = transform(results, **parameters)
Modified: trunk/server/cgi/xsl/Makefile =================================================================== --- trunk/test-env/www/cgi/xsl/Makefile 2011-06-08 15:39:45 UTC (rev 953) +++ trunk/server/cgi/xsl/Makefile 2011-06-15 19:44:01 UTC (rev 956) @@ -18,13 +18,13 @@
FILES := default.xsl test.xsl filter.xsl summary.xsl run.xsl device.xsl V7_CATALOG_XSL := xml-package-summary.xsl +V7_SERVER_ROOT := /var/www/v7
clean: - rm -rf $(DESTDIR)/var/v7/xsl + rm -rf $(DESTDIR)$(V7_SERVER_ROOT)/xsl
install: - mkdir -p $(DESTDIR)/var/v7/xsl -# for file in $(V7_CATALOG_XSL); do cp -f $(V7_CATALOG_CSS_COPY)/$$file $(DESTDIR)/var/v7/xsl/$$file; done - for file in $(FILES); do cp -f $$file $(DESTDIR)/var/v7/xsl/$$file; done - + mkdir -p $(DESTDIR)$(V7_SERVER_ROOT)/xsl +# for file in $(V7_CATALOG_XSL); do cp -f $(V7_CATALOG_CSS_COPY)/$$file $(DESTDIR)$(V7_SERVER_ROOT)/xsl/$$file; done + for file in $(FILES); do cp -f $$file $$(DESTDIR)$(V7_SERVER_ROOT)/xsl/$$file; done
Modified: trunk/server/css/Makefile =================================================================== --- trunk/test-env/www/css/Makefile 2011-06-08 15:39:45 UTC (rev 953) +++ trunk/server/css/Makefile 2011-06-15 19:44:01 UTC (rev 956) @@ -17,14 +17,15 @@
V7_CATALOG_CSS := +V7_SERVER_ROOT := /var/www/v7
FILES := v7.css results.css
clean: - rm -rf $(DESTDIR)/var/v7/css + rm -rf $(DESTDIR)$(V7_SERVER_ROOT)/css
all install: - mkdir -p $(DESTDIR)/var/v7/css - for file in $(FILES); do install -m 644 $$file $(DESTDIR)/var/v7/css/$$file; done - for file in $(V7_CATALOG_CSS_FILES); do cp -f $(V7_CATALOG_CSS_COPY)/$$file $(DESTDIR)/var/v7/css/$$file; done + mkdir -p $(DESTDIR)$(V7_SERVER_ROOT)/css + for file in $(FILES); do install -m 644 $$file $(DESTDIR)$(V7_SERVER_ROOT)/css/$$file; done + for file in $(V7_CATALOG_CSS_FILES); do cp -f $(V7_CATALOG_CSS_COPY)/$$file $(DESTDIR)$(V7_SERVER_ROOT)/css/$$file; done
Modified: trunk/server/images/Makefile =================================================================== --- trunk/test-env/www/images/Makefile 2011-06-08 15:39:45 UTC (rev 953) +++ trunk/server/images/Makefile 2011-06-15 19:44:01 UTC (rev 956) @@ -17,12 +17,13 @@
FILES := logo_rh_home.png favicon.ico +V7_SERVER_ROOT := /var/www/v7
clean: - rm -rf $(DESTDIR)/var/v7/images + rm -rf $(DESTDIR)$(V7_SERVER_ROOT)/images
all install: - rm -rf $(DESTDIR)/var/v7/images - mkdir -p $(DESTDIR)/var/v7/images - for file in $(FILES); do install -m 644 $$file $(DESTDIR)/var/v7/images/$$file; done + rm -rf $(DESTDIR)$(V7_SERVER_ROOT)/images + mkdir -p $(DESTDIR)$(V7_SERVER_ROOT)/images + for file in $(FILES); do install -m 644 $$file $$(DESTDIR)$(V7_SERVER_ROOT)/images/$$file; done
Modified: trunk/test-env/Makefile =================================================================== --- trunk/test-env/Makefile 2011-06-15 19:41:25 UTC (rev 955) +++ trunk/test-env/Makefile 2011-06-15 19:44:01 UTC (rev 956) @@ -17,7 +17,7 @@
-SUBDIRS := bin lib www kickstart init +SUBDIRS := bin lib kickstart init
all: for i in $(SUBDIRS); do $(MAKE) -C $$i DESTDIR=$(DESTDIR); done
Modified: trunk/tools/v7-release.py =================================================================== --- trunk/tools/v7-release.py 2011-06-15 19:41:25 UTC (rev 955) +++ trunk/tools/v7-release.py 2011-06-15 19:44:01 UTC (rev 956) @@ -25,6 +25,7 @@ distDir = "/home/gnichols/dist/v7"
sourceTar = "%s/v7-%s-%s.el%s.tar.bz2" % (buildDir, v7.version.version, v7.version.release, v7.version.rhel_version) +serverSourceTar = "%s/v7-server-%s-%s.el%s.tar.bz2" % (buildDir, v7.version.version, v7.version.release, v7.version.rhel_version)
print "building for RHEL %s" % v7.version.rhel_version
@@ -34,11 +35,15 @@
#copy the spec file shutil.copy(os.path.join(buildDir, "v7.spec"), "v7.spec") +shutil.copy(os.path.join(buildDir, "v7-server.spec"), "v7-server.spec")
# upload the tarball command = "make upload FILES=%s" % sourceTar print command os.system(command) +command = "make upload FILES=%s" % serverSourceTar +print command +os.system(command)
# commit the new source and spec command = "cvs commit -m "R%s" . " % v7.version.release
Added: trunk/v7-server.spec.in =================================================================== --- trunk/v7-server.spec.in (rev 0) +++ trunk/v7-server.spec.in 2011-06-15 19:44:01 UTC (rev 956) @@ -0,0 +1,67 @@ +%define version @V7_VERSION@ +%define release @V7_RELEASE@ +%define rhel_version @V7_RHEL_VERSION@ + +# The behaviour of the rpm-build package for python files varies between +# releases. Sometime in the FC4 timeframe it gained a file +# /usr/lib/rpm/brp-python-bytecompile which generates pyo and pyc files for py +# files, in a phase after the install. +# This macro is needed to turn this off, for building on FC4/RHEL5 and later: +%define byte_compiled_python 0 + +Name: v7-server +Summary: Red Hat Hardware Test Suite Server +Version: %{version} +Release: %{release}.el%{rhel_version} +Group: Development/Tools +License: GPL +URL: http://redhat.com +Source0: %{name}-%{version}-%{release}.tar.bz2 +# snapshot +Buildroot: %{_tmppath}/%{name}-%{version}-root +BuildArch: noarch + +Requires: v7 +Requires: python-lxml + + +%description +Red Hat Hardware Test Suite certifies hardware for Red Hat Enterprise Linux + + +%prep +%setup -q -c + + +%build +[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT; +DESTDIR=$RPM_BUILD_ROOT make V7_RHEL_VERSION=%{rhel_version} install-server + +%install +DESTDIR=$RPM_BUILD_ROOT make V7_RHEL_VERSION=%{rhel_version} install-server + +%clean +[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT; + +%pre + +%post + + +%files +%defattr(-,root,root) +# set to user apache for web/cgi serving +%attr(-, apache, apache) /var/v7 +/etc/httpd/conf.d/v7.conf + + + +%changelog +* Tue Jun 14 2011 Greg Nichols gnichols@redhat.com + +V7 1.4 R1 + + - initial build for a server rpm requiring v7 + + +
Modified: trunk/v7.spec.in =================================================================== --- trunk/v7.spec.in 2011-06-15 19:41:25 UTC (rev 955) +++ trunk/v7.spec.in 2011-06-15 19:44:01 UTC (rev 956) @@ -61,14 +61,18 @@ /usr/bin/v7-report-result /usr/bin/v7 /usr/share/v7 -# set to user apache for web/cgi serving -%attr(-, apache, apache) /var/v7 -/etc/httpd/conf.d/v7.conf /usr/share/man/man8/v7.8.gz /etc/init.d/v7
%changelog +* Wed Jun 15 2011 Greg Nichols gnichols@redhat.com + +V7 1.4 R1 + + 690676 - FEAT: v7 should generate zipped xml file as results + 702695 - v7 server should have it's own package + * Wed Jun 08 2011 Greg Nichols gnichols@redhat.com
V7 1.4 R0
v7-commits@lists.stg.fedorahosted.org