--- /dev/null
+# $Id: Makefile 10670 2008-09-26 13:43:51Z thierry $
+CURL := curl -H Pragma: -O -R -S --fail --show-error
+SHA1SUM = sha1sum
+
+# default - overridden by the build
+SPECFILE = drupal.spec
+
+version=6.7
+
+main.URL := http://ftp.drupal.org/files/projects/drupal-$(version).tar.gz
+main.SHA1SUM := 1a1f9955878b794bbf201e2f8544f00c74121c3c
+
+main.FILE := $(notdir $(main.URL))
+
+# Thierry - when called from within the build, PWD is /build
+SOURCEFILES := $(main.FILE)
+
+$(main.FILE): #FORCE
+ @if [ ! -e "$@" ] ; then echo "$(CURL) $(main.URL)" ; $(CURL) $(main.URL) ; fi
+ @if [ ! -e "$@" ] ; then echo "Could not download source file: $@ does not exist" ; exit 1 ; fi
+ @if test "$$(sha1sum $@ | awk '{print $$1}')" != "$(main.SHA1SUM)" ; then \
+ echo "sha1sum of the downloaded $@ does not match the one from 'sources' file" ; \
+ echo "Local copy: $$(sha1sum $@)" ; \
+ echo "In sources: $(main.SHA1SUM)" ; \
+ exit 1 ; \
+ else \
+ ls -l $@ ; \
+ fi
+
+sources: $(SOURCEFILES)
+.PHONY: sources
+
+PWD=$(shell pwd)
+PREPARCH ?= noarch
+RPMDIRDEFS = --define "_sourcedir $(PWD)" --define "_builddir $(PWD)" --define "_srcrpmdir $(PWD)" --define "_rpmdir $(PWD)"
+trees: sources
+ rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bp --target $(PREPARCH) $(SPECFILE)
+
+srpm: sources
+ rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bs $(SPECFILE)
+
+TARGET ?= $(shell uname -m)
+rpm: sources
+ rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps --target $(TARGET) -bb $(SPECFILE)
+
+clean:
+ rm -f *.rpm *.tgz *.bz2 *.gz
+
+++%: varname=$(subst +,,$@)
+++%:
+ @echo "$(varname)=$($(varname))"
++%: varname=$(subst +,,$@)
++%:
+ @echo "$($(varname))"
--- /dev/null
+diff -u scripts/code-clean.sh scripts.new/code-clean.sh
+--- scripts/code-clean.sh 2008-02-22 07:37:31.000000000 -0600
++++ scripts.new/code-clean.sh 2008-02-22 07:37:31.000000000 -0600
+@@ -1,4 +1,3 @@
+-#!/bin/sh
+ # $Id: code-clean.sh,v 1.8 2005/08/11 13:02:08 dries Exp $
+
+ find . -name "*~" -type f | xargs rm -f
+diff -u scripts/code-style.pl scripts.new/code-style.pl
+--- scripts/code-style.pl 2008-02-22 07:37:57.000000000 -0600
++++ scripts.new/code-style.pl 2008-02-22 07:37:57.000000000 -0600
+@@ -1,4 +1,3 @@
+-#!/usr/bin/perl -w
+ # $Id: code-style.pl,v 1.14 2007/02/15 11:40:19 dries Exp $
+
+ use Pod::Usage;
+diff -u scripts/cron-curl.sh scripts.new/cron-curl.sh
+--- scripts/cron-curl.sh 2008-02-22 07:38:04.000000000 -0600
++++ scripts.new/cron-curl.sh 2008-02-22 07:38:04.000000000 -0600
+@@ -1,4 +1,3 @@
+-#!/bin/sh
+ # $Id: cron-curl.sh,v 1.3 2006/08/22 07:38:24 dries Exp $
+
+ curl --silent --compressed http://example.com/cron.php
+diff -u scripts/cron-lynx.sh scripts.new/cron-lynx.sh
+--- scripts/cron-lynx.sh 2008-02-22 07:38:09.000000000 -0600
++++ scripts.new/cron-lynx.sh 2008-02-22 07:38:09.000000000 -0600
+@@ -1,4 +1,3 @@
+-#!/bin/sh
+ # $Id: cron-lynx.sh,v 1.3 2006/08/22 07:38:24 dries Exp $
+
+ /usr/bin/lynx -source http://example.com/cron.php > /dev/null 2>&1
+diff -u scripts/drupal.sh scripts.new/drupal.sh
+--- scripts/drupal.sh 2008-02-22 07:38:17.000000000 -0600
++++ scripts.new/drupal.sh 2008-02-22 07:38:17.000000000 -0600
+@@ -1,4 +1,3 @@
+-#!/usr/bin/php
+ <?php
+ // $Id: drupal.sh,v 1.4 2007/07/02 14:41:37 dries Exp $
+
--- /dev/null
+Initially upon install, Drupal requires two additional installation steps:
+
+1. DB setup
+
+To begin with, install php-mysql or php-pgsql, depending on which db backend
+you intend to use.
+
+Then, follow the installation instructions in INSTALL.*.txt to complete the
+setup of and connection of Drupal to the required database, including chmod
+666 on /etc/drupal/default/settings.php, uncommenting the appropriate line in
+/etc/httpd/conf.d/drupal.conf, and restarting httpd.
+
+Once these steps have been completed, you should be ready to connect to http://yourhost/drupal
+to complete the initial setup.
+
+Remember to change the /etc/drupal/default/settings.php permissions back to
+644 when you've finished the initial setup.
+
+2. Enable remote access
+
+Drupal ships in Fedora with all non-localhost access disabled. Comment and
+uncomment lines in /etc/httpd/conf.d/drupal.conf as appropriate, and restart
+httpd.
+
+Regarding the file layout:
+Pay careful attention to the placement of the directories as established by
+the package. If you need to relocate files due to size, for custom modules
+not included in Fedora, or for large custom site data, be careful to do so
+without altering any of the symlinks owned by the package. Most configurations
+should not run into problems, but if any symlinks are changed, they will be
+re-written when the package is upgraded, which could break the site until
+you re-change the symlink.
+
+3. SSL/TLS usage.
+CVE-2008-3661 relates to the security of session cookies and SSL/TLS.
+
+http://int21.de/cve/CVE-2008-3661-drupal.html
+http://www.securityfocus.com/bid/31285
+
+To help mitigate this, uncomment the following line in /etc/httpd/conf.d/drupal.conf:
+#php_flag session.cookie_secure on
--- /dev/null
+#
+# $Id: drupal.spec 1206 2008-03-03 15:49:07Z thierry $
+#
+
+%define name drupal
+%define version 6.7
+%define taglevel 0
+
+%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
+
+Packager: PlanetLab Central <support@planet-lab.org>
+
+# remain compliant with former planetlab practices
+%define drupaldir /var/www/html
+Name: %{name}
+Version: %{version}
+Release: %{release}
+Summary: An open-source content-management platform
+
+Group: Applications/Publishing
+License: GPLv2+
+URL: http://www.drupal.org
+Source0: http://ftp.osuosl.org/pub/drupal/files/projects/%{name}-%{version}.tar.gz
+#Source1: drupal.conf
+Source2: drupal-README.fedora
+Source3: drupal-cron
+Source4: drupal-README.planetlab
+Patch0: drupal-6.0-scripts-noshebang.patch
+
+BuildArch: noarch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires: php, php-gd, php-mbstring, wget
+
+%description
+Equipped with a powerful blend of features, Drupal is a Content Management
+System written in PHP that can support a variety of websites ranging from
+personal weblogs to large community-driven websites. Drupal is highly
+configurable, skinnable, and secure.
+
+%prep
+
+%setup -q
+
+%patch0
+chmod -x scripts/drupal.sh
+
+%build
+
+%install
+rm -rf %{buildroot}
+install -d %{buildroot}%{drupaldir}
+cp -pr * %{buildroot}%{drupaldir}
+cp -pr .htaccess %{buildroot}%{drupaldir}
+#mkdir -p %{buildroot}%{_sysconfdir}/httpd
+#mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d
+#cp -pr %SOURCE1 %{buildroot}%{_sysconfdir}/httpd/conf.d
+#mkdir -p %{buildroot}%{_sysconfdir}/drupal
+#mv %{buildroot}%{drupaldir}/sites/* %{buildroot}%{_sysconfdir}/drupal
+#rmdir %{buildroot}%{drupaldir}/sites
+#ln -s ../../..%{_sysconfdir}/drupal %{buildroot}%{drupaldir}/sites
+mkdir -p %{buildroot}%{_docdir}
+cp -pr %SOURCE2 .
+cp -pr %SOURCE4 .
+install -D -p -m 0644 %SOURCE3 %{buildroot}%{_sysconfdir}/cron.hourly/drupal
+mkdir -p %{buildroot}%{_localstatedir}/lib/drupal
+ln -s ../../..%{_localstatedir}/lib/drupal %{buildroot}%{drupaldir}/files
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc CHANGELOG.txt INSTALL* LICENSE* MAINTAINERS.txt UPGRADE.txt
+%doc drupal-README.fedora drupal-README.planetlab sites/all/README.txt
+%{drupaldir}
+%config(noreplace) %{drupaldir}/.htaccess
+%exclude %{drupaldir}/CHANGELOG.txt
+%exclude %{drupaldir}/INSTALL*
+%exclude %{drupaldir}/LICENSE*
+%exclude %{drupaldir}/MAINTAINERS.txt
+%exclude %{drupaldir}/UPGRADE.txt
+#%dir %{_sysconfdir}/drupal/
+#%config(noreplace) %{_sysconfdir}/drupal/all
+%config(noreplace) %{drupaldir}/sites/all
+#%exclude %{_sysconfdir}/drupal/all/README.txt
+%exclude %{drupaldir}/sites/all/README.txt
+#%config(noreplace) %{_sysconfdir}/drupal/default
+%config(noreplace) %{drupaldir}/sites/default
+#%config(noreplace) %{_sysconfdir}/httpd/conf.d/drupal.conf
+%attr(755,root,apache) %{_sysconfdir}/cron.hourly/drupal
+%dir %attr(775,root,apache) %{_localstatedir}/lib/drupal/
+
+%changelog
+* Thu Dec 11 2008 Jon Ciesla <limb@jcomserv.net> - 6.7-1
+- Upgrade to 6.7, SA-2008-073.
+
+* Wed Oct 22 2008 Jon Ciesla <limb@jcomserv.net> - 6.6-1
+- Upgrade to 6.6, SA-2008-067.
+
+* Thu Oct 09 2008 Jon Ciesla <limb@jcomserv.net> - 6.5-1
+- Upgrade to 6.5, SA-2008-060.
+- Added notes to README and drupal.conf re CVE-2008-3661.
+
+* Thu Aug 14 2008 Jon Ciesla <limb@jcomserv.net> - 6.4-1
+- Upgrade to 6.4, SA-2008-047.
+
+* Thu Jul 10 2008 Jon Ciesla <limb@jcomserv.net> - 6.3-1
+- Upgrade to 6.3, upstream security fixes, SA-2008-044.
+
+* Thu Apr 10 2008 Jon Ciesla <limb@jcomserv.net> - 6.2-1
+- Upgrade to 6.2, upstream security fixes, SA-2008-026.
+
+* Thu Feb 28 2008 Jon Ciesla <limb@jcomserv.net> - 6.1-1
+- Upgrade to 6.1, upstream security fixes, SA-2008-018.
+
+* Fri Feb 22 2008 Jon Ciesla <limb@jcomserv.net> - 6.0-1
+- Upgrade to 6.0.
+- Updated noshebang patch.
+
+* Mon Feb 04 2008 Jon Ciesla <limb@jcomserv.net> - 5.7-1
+- Upgrade to 5.7, several non-security bugs fixed.
+
+* Fri Jan 11 2008 Jon Ciesla <limb@jcomserv.net> - 5.6-1
+- Upgrade to 5.6, upstream security fixes.
+
+* Mon Jan 07 2008 Jon Ciesla <limb@jcomserv.net> - 5.5-2
+- Include .htaccess file, BZ 427720.
+
+* Mon Dec 10 2007 Jon Ciesla <limb@jcomserv.net> - 5.5-1
+- Upgrade to 5.5, critical fixes.
+
+* Thu Dec 06 2007 Jon Ciesla <limb@jcomserv.net> - 5.4-2
+- Fix /files -> /var/lib/drupal dir perms, BZ 414761.
+
+* Wed Dec 05 2007 Jon Ciesla <limb@jcomserv.net> - 5.4-1
+- Upgrade to 5.4, advisory ID DRUPAL-SA-2007-031.
+- Augmented README regarding symlinks, BZ 254228.
+
+* Thu Oct 18 2007 Jon Ciesla <limb@jcomserv.net> - 5.3-1
+- Upgrade to 5.3, fixes:
+- HTTP response splitting.
+- Arbitrary code execution.
+- Cross-site scripting.
+- Cross-site request forgery.
+- Access bypass.
+
+* Mon Sep 24 2007 Jon Ciesla <limb@jcomserv.net> - 5.2-3
+- Minor doc correction, BZ 301541.
+
+* Thu Aug 16 2007 Jon Ciesla <limb@jcomserv.net> - 5.2-2
+- License tag correction.
+
+* Thu Jul 26 2007 Jon Ciesla <limb@jcomserv.net> - 5.2-1
+- Upgrade to 5.2, Cross-site request forgery fix.
+
+* Fri Jul 20 2007 Jon Ciesla <limb@jcomserv.net> - 5.1-5
+- Corrected buildroot.
+- Moved /etc/drupal/all/README.txt to correct place.
+
+* Wed Jul 04 2007 Jon Ciesla <limb@jcomserv.net> - 5.1-4
+- Made settings.php not readonly by default, with note in drupal-README.fedora
+- Locked down initial security configuration, documented steps required.
+- Description cleanup.
+- Added wget requires.
+
+* Wed Jun 06 2007 Jon Ciesla <limb@jcomserv.net> - 5.1-3
+- Fixed initial setting.php perms.
+- Added files dir.
+
+* Wed May 30 2007 Jon Ciesla <limb@jcomserv.net> - 5.1-2
+- Fixed category, duped docs, apache restart, cron job.
+
+* Wed May 30 2007 Jon Ciesla <limb@jcomserv.net> - 5.1-1
+- Initial packaging.