Thomas NOËL 2015-02-13 11:14:09 +01:00
parent 512680d5ad
commit 4e84ff106c
37 changed files with 733 additions and 121 deletions

View File

@ -2,6 +2,6 @@
<service name="download_src_package">
<param name="host">fr2.rpmfind.net</param>
<param name="protocol">ftp</param>
<param name="path">linux/fedora/linux/development/rawhide/source/SRPMS/f/fontawesome-fonts-4.1.0-1.fc21.src.rpm</param>
<param name="path">linux/fedora/linux/development/rawhide/source/SRPMS/f/fontawesome-fonts-4.1.0-2.fc22.src.rpm</param>
</service>
</services>
</services>

View File

@ -2,6 +2,6 @@
<service name="download_src_package">
<param name="host">fr2.rpmfind.net</param>
<param name="protocol">ftp</param>
<param name="path">linux/fedora/linux/development/rawhide/source/SRPMS/f/fontawesome-fonts-4.1.0-1.fc21.src.rpm</param>
<param name="path">linux/fedora/linux/development/rawhide/source/SRPMS/f/fontawesome-fonts-4.1.0-2.fc22.src.rpm</param>
</service>
</services>
</services>

View File

@ -0,0 +1,7 @@
<services>
<service name="download_src_package">
<param name="host">fr2.rpmfind.net</param>
<param name="protocol">ftp</param>
<param name="path">linux/fedora/linux/development/rawhide/source/SRPMS/f/fontawesome-fonts-4.1.0-2.fc22.src.rpm</param>
</service>
</services>

View File

@ -0,0 +1,7 @@
<services>
<service name="download_src_package">
<param name="host">fr2.rpmfind.net</param>
<param name="protocol">ftp</param>
<param name="path">linux/fedora/linux/development/rawhide/source/SRPMS/f/fontpackages-1.44-10.fc21.src.rpm</param>
</service>
</services>

View File

@ -0,0 +1,7 @@
<services>
<service name="download_url">
<param name="host">repos.entrouvert.org</param>
<param name="protocol">http</param>
<param name="path">/passerelle.git/snapshot/passerelle-ef79c2a.tar.gz</param>
</service>
</services>

View File

@ -0,0 +1,41 @@
# This file is sourced by "execfile" from passerelle.settings
SECRET_KEY = file('/etc/passerelle/secret').read()
# cg14 root URI is "/passerelle/..."
LOGIN_URL = '/passerelle/accounts/login/'
LOGOUT_URL = '/passerelle/accounts/logout/'
LOGIN_REDIRECT_URL = '/passerelle/manage/'
LANGUAGE_CODE = 'fr-fr'
TIME_ZONE = 'Europe/Paris'
STATIC_ROOT = '/usr/share/passerelle/static'
STATIC_URL = '/passerelle/static/'
MEDIA_ROOT = '/var/lib/passerelle/media'
MEDIA_URL = '/passerelle/media/'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'passerelle',
}
}
# add solis and makorepost just before gadjo
INSTALLED_APPS = INSTALLED_APPS[:-1] + (
'solis',
'makorepost',
'bdp',
'gadjo',
'entrouvert.djommon',
)
# where to find templates for makorepost objects
MAKO_TEMPLATES_DIRS = (
os.path.join(PACKAGE_PATH, 'apps', 'makorepost', 'templates.mako'),
os.path.join(PACKAGE_PATH, 'apps', 'solis', 'templates.mako'),
)
MAKO_TEMPLATES_MODULES = None # store generated Mako module files in this directory (optional)
execfile('/etc/passerelle/config.py')

View File

@ -0,0 +1,41 @@
# Configuration for passerelle.
# You can override Passerelle default settings here
# Passerelle is a Django application: for the full list of settings and their
# values, see https://docs.djangoproject.com/en/1.7/ref/settings/
# For more information on settings see
# https://docs.djangoproject.com/en/1.7/topics/settings/
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
# This file is sourced by "execfile" from /usr/lib/passerelle/cg14_config.py
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
TEMPLATE_DEBUG = False
# mailto for fatal errors (500)
ADMINS = (
('admin passerelle', 'passerelle-admin@calvados.fr'),
# ('User 1', 'watchdog@example.net'),
# ('User 2', 'janitor@example.net'),
)
MANAGERS = ADMINS
# ALLOWED_HOSTS must be correct in production
ALLOWED_HOSTS = ['*'] # cg14: we are behind a pile of reverse proxies... :/
#See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
#ALLOWED_HOSTS = [
# 'teleservices.calvados.fr',
# 'teleservices.calvados.fr.',
# 'internal-reverse-proxy-name',
# 'internal-reverse-proxy-name.',
#]
# Passerelle use a postgresql database
# Default: a local database named "passerelle"
# DATABASES['default']['name'] = 'passerelle'
# DATABASES['default']['user'] = 'passerelle'
# DATABASES['default']['password'] = '******'
# DATABASES['default']['host'] = 'localhost'
# DATABASES['default']['port'] = '5432'

View File

@ -1,56 +0,0 @@
# CG14 /etc/passerelle/local_settings.py
DEBUG = False
TEMPLATE_DEBUG = DEBUG
# traceback recipients if DEBUG=False
ADMINS = (
# ('root', 'root@localhost'),
('admin passerelle', 'passerelle-admin@calvados.fr'),
)
MANAGERS = ADMINS
# we're behind a pile of reverse-proxies...
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['*']
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'Europe/Paris'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'fr-fr'
#
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'passerelle',
}
}
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'passerelle.base',
'passerelle.datasources',
'passerelle.repost',
'solis',
'makorepost',
'south',
)
MEDIA_ROOT = '/var/lib/passerelle/media'
MEDIA_URL = '/passerelle/media/'
STATIC_ROOT = '/usr/share/passerelle/static'
STATIC_URL = '/passerelle/static/'

View File

@ -0,0 +1,23 @@
#!/bin/sh
NAME=passerelle
MANAGE="/usr/lib/$NAME/manage.py --config=/usr/lib/${NAME}/cg14_config.py"
# check user
if test x$1 = x"--forceuser"
then
shift
elif test $(id -un) != "$NAME"
then
echo "error: must use $0 with user ${NAME}"
exit 1
fi
if test $# -eq 0
then
python ${MANAGE} help
exit 1
fi
python ${MANAGE} "$@"

View File

@ -27,40 +27,57 @@ PIDFILE=/var/run/$NAME/$NAME.pid
LOGFILE=/var/log/$NAME/gunicorn.log
USER=passerelle
GROUP=passerelle
MANAGEPY=/usr/bin/${NAME}_manage.py
MANAGE=/usr/bin/${NAME}-manage
STARTLOG=/var/log/passerelle/start.log
lockfile=/var/lock/subsys/$NAME
GUNICORN_OPTIONS="--bind 127.0.0.1:8484 --workers=3"
DJANGO_SETTINGS_MODULE=passerelle.settings
DJANGO_CONFIG_FILE=/usr/lib/$NAME/cg14_config.py
DAEMON_OPTIONS="--bind 127.0.0.1:8484 --workers=3"
[ -e /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
do_create_secret() {
SECRET_FILE=/etc/passerelle/secret
if [ ! -f $SECRET_FILE ]; then
echo "Generating Django secret..."
cat /dev/urandom | tr -dc [:alnum:]-_\!\%\^:\; | head -c70 > $SECRET_FILE
chown root:passerelle $SECRET_FILE
chmod 0440 $SECRET_FILE
fi
}
do_migrate() {
# install new applications, if any, migrate others if needed
echo "Installing new apps, applying new migrations (safemigrate)..."
$SCRIPTNAME manage safemigrate --verbosity=2 --traceback --noinput
}
do_collectstatic() {
echo "Collect static files..."
chown -R passerelle:passerelle /usr/share/passerelle/static
$SCRIPTNAME manage collectstatic --clear --verbosity=2 --traceback --noinput
chown -R root:root /usr/share/passerelle/static
}
start() {
[ -x $DAEMON ] || exit 5
# CG14 HACK -- first launch after South installation : fake migrations
# (to be removed)
if test ! -f /etc/passerelle/migrate-fake-done; then
# install south tables
$SCRIPTNAME manage syncdb --noinput && \
$SCRIPTNAME manage migrate --fake --noinput && \
touch /etc/passerelle/migrate-fake-done
fi
if test ! -f /etc/passerelle/migrate-fake-done; then
echo "ERR: migrate --fake failed"
echo "ERR: /etc/passerelle/migrate-fake-done file"
exit 1
fi
date > $STARTLOG
do_create_secret >> $STARTLOG 2>&1
do_migrate >> $STARTLOG 2>&1
do_collectstatic >> $STARTLOG 2>&1
# install new applications, if any
$SCRIPTNAME manage syncdb --migrate --noinput
echo $"Starting $NAME: "
echo $"Starting $NAME (via gunicorn): "
daemon $DAEMON --daemon \
--pid $PIDFILE \
--user $USER --group $GROUP \
--error-logfile $LOGFILE \
$GUNICORN_OPTIONS \
--env DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE \
--env DJANGO_CONFIG_FILE=$DJANGO_CONFIG_FILE \
$DAEMON_OPTIONS \
passerelle.wsgi:application
retval=$?
[ $retval -eq 0 ] && touch $lockfile
@ -129,9 +146,9 @@ case "$1" in
manage)
shift
if [ $(id -un) != $USER ]; then
sudo -H -u $USER $MANAGEPY "$@"
sudo -H -u $USER $MANAGE "$@"
else
$MANAGEPY "$@"
$MANAGE "$@"
fi
;;
*)

View File

@ -1,8 +1,8 @@
%define tag 0.3.0
%define commit 9863723
%define tag 0.5.0
%define commit ef79c2a
# si possible, minor = nombre de commit depuis le tag (à la "git describe")
%define minor 1
%define minor 48
# si minor == 0
#%define version %{tag}
@ -19,18 +19,20 @@ Summary: Uniform access to multiple data sources and services.
Group: Development/Languages
License: AGPL
URL: https://dev.entrouvert.org/projects/passerelle
Source0: passerelle-9863723_with-initial-base-migration.tar.gz
Source0: passerelle-%{commit}.tar.gz
Source1: passerelle.init
Source2: local_settings.py
Source2: config.py
Source3: synchro-wcs-suivi.sh
Source4: synchro-wcs-suivi.conf
Source5: synchro-cron.sh
Source6: wcs-au-quotidien.cron.d
Source7: passerelle-manage
Source8: cg14_config.py
BuildArch: noarch
BuildRequires: python2-devel python-django python-setuptools-devel
Requires: python-django python-South python-django-jsonresponse python-django-model-utils python-gunicorn python-Mako python-raven
Requires: python-django python-South python-django-jsonresponse python-django-model-utils python-gunicorn python-Mako python-raven python-django-gadjo python-requests python-django-jsonfield python-entrouvert
%description
Passerelle provides an uniform access to multiple data sources and services.
@ -44,6 +46,8 @@ getent passwd passerelle >/dev/null || useradd -r -g passerelle -s /sbin/nologin
install -d -m 0750 -o passerelle -g passerelle /var/run/passerelle
install -d -m 0750 -o passerelle -g passerelle /var/log/passerelle
install -d -m 0750 -o passerelle -g passerelle /var/lib/passerelle/media
install -d -m 0750 -o passerelle -g passerelle /usr/share/lib/passerelle/static
chown -R passerelle:passerelle /usr/share/lib/passerelle/static
exit 0
%build
@ -51,20 +55,21 @@ exit 0
%install
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
install -d -m 0755 $RPM_BUILD_ROOT/usr/lib/passerelle
mv $RPM_BUILD_ROOT/usr/bin/manage.py $RPM_BUILD_ROOT/usr/lib/passerelle/manage.py
install -D -p -m 755 %{SOURCE8} $RPM_BUILD_ROOT/usr/lib/passerelle/cg14_config.py
install -D -p -m 755 %{SOURCE7} $RPM_BUILD_ROOT/usr/bin/passerelle-manage
install -d -m 0755 $RPM_BUILD_ROOT/etc/passerelle
install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/passerelle/local_settings.py
install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/passerelle/config.py
install -D -p -m 755 %{SOURCE3} $RPM_BUILD_ROOT/etc/passerelle/synchro-wcs-suivi.sh
install -D -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT/etc/passerelle/synchro-wcs-suivi.conf
install -D -p -m 755 %{SOURCE5} $RPM_BUILD_ROOT/etc/passerelle/synchro-cron.sh
install -D -p -m 644 %{SOURCE6} $RPM_BUILD_ROOT/etc/cron.d/wcs-au-quotidien
ln -s /etc/passerelle/local_settings.py $RPM_BUILD_ROOT/%{python_sitelib}/passerelle/local_settings.py
install -D -p -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/rc.d/init.d/passerelle
install -d -m 0755 $RPM_BUILD_ROOT/usr/share/passerelle/static
install -d -m 0755 $RPM_BUILD_ROOT/usr/share/passerelle/templates.mako
%post
/sbin/chkconfig --add passerelle
/usr/bin/passerelle_manage.py collectstatic --noinput
%preun
if [ $1 -eq 0 ]; then
@ -84,11 +89,12 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/passerelle
%{python_sitelib}/passerelle-*.egg-info
%{_sysconfdir}/rc.d/init.d/passerelle
/usr/share/passerelle/static
/usr/bin/passerelle_manage.py
/usr/bin/passerelle-manage
/usr/lib/passerelle/manage.py
/usr/lib/passerelle/cg14_config.py
/etc/passerelle/synchro-cron.sh
/etc/passerelle/synchro-wcs-suivi.sh
%config /etc/passerelle/local_settings.py
%config /etc/passerelle/config.py
%config /etc/passerelle/synchro-wcs-suivi.conf
%config /etc/cron.d/wcs-au-quotidien
%doc LICENSE

View File

@ -1,6 +1,12 @@
#!/bin/bash
set -e
if [ `/usr/bin/id -un` != 'wcs-au-quotidien' ]
then
echo "$0 must be run by user wcs-au-quotidien"
exit 1
fi
BASE_URL=https://teleservices.calvados.fr/passerelle/
APIKEY=d24709cfde8b9e9b5743c43c3ab49f65
VHOST=apl108

View File

@ -15,7 +15,7 @@ HOME=/
# * * * * * user-name command to be executed
# production
10,30,50 * * * * wcs-au-quotidien /etc/passerelle/synchro-cron.sh
# 10,30,50 * * * * wcs-au-quotidien /etc/passerelle/synchro-cron.sh
# test/recette
# 0,5,10,15,20,25,30,35,40,45,50,55 * * * * wcs-au-quotidien /etc/passerelle/synchro-cron.sh

View File

@ -0,0 +1,7 @@
<services>
<service name="download_url">
<param name="host">pypi.python.org</param>
<param name="protocol">https</param>
<param name="path">/packages/source/X/XStatic-Font-Awesome/XStatic-Font-Awesome-4.1.0.0.tar.gz</param>
</service>
</services>

View File

@ -0,0 +1,76 @@
%global pypi_name XStatic-Font-Awesome
%{!?__python2:%global __python2 %{__python}}
Name: python-%{pypi_name}
Version: 4.1.0.0
Release: 2%{?dist}
Summary: Font-Awesome (XStatic packaging standard)
# font awesome is licensed under SIL 1.1.
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses_4
# short name: OFL
# Code is distributed under MIT
License: OFL and MIT
URL: https://fortawesome.github.io/Font-Awesome/
Source0: https://pypi.python.org/packages/source/X/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: web-assets-devel
BuildRequires: fontawesome-fonts
Requires: python-XStatic
Requires: web-assets-filesystem
Requires: fontawesome-fonts-web >= 4.1.0
Requires: fontawesome-fonts
%description
Font Awesome icons packaged for setuptools (easy_install) / pip.
This package is intended to be used by any project that needs these files.
It intentionally does not provide any extra code
except some metadata nor has any extra requirements.
%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%{__python2} setup.py build
%install
%{__python2} setup.py install --skip-build --root %{buildroot}
# use fontawesome-fonts directly
rm -f %{buildroot}/%{python_sitelib}/xstatic/pkg/font_awesome/data/fonts/*
ln -s %{_datadir}/fonts/fontawesome/* %{buildroot}/%{python_sitelib}/xstatic/pkg/font_awesome/data/fonts/
# use fontawesome-fonts-web for css, scss,
for dir in css less scss ; do
rm -rf %{buildroot}/%{python_sitelib}/xstatic/pkg/font_awesome/data/$dir
ln -s %{_datadir}/font-awesome-web/$dir %{buildroot}/%{python_sitelib}/xstatic/pkg/font_awesome/data/$dir
done
%files
%doc README.txt
%{python_sitelib}/xstatic/pkg/font_awesome
%{python_sitelib}/XStatic_Font_Awesome-%{version}-py%{python_version}.egg-info
%{python_sitelib}/XStatic_Font_Awesome-%{version}-py%{python_version}-nspkg.pth
%changelog
* Wed Oct 01 2014 Matthias Runge <mrunge@redhat.com> - 4.1.0.0-2
- require at least version 4.1.0 of fontawesome-fonts-web
* Wed Sep 10 2014 Matthias Runge <mrunge@redhat.com> - 4.1.0.0-1
- Initial package. (rhbz#1140377)

View File

@ -0,0 +1,7 @@
<services>
<service name="download_src_package">
<param name="host">fr2.rpmfind.net</param>
<param name="protocol">ftp</param>
<param name="path">linux/fedora/linux/development/rawhide/source/SRPMS/p/python-XStatic-jQuery-1.10.2.1-1.fc22.src.rpm</param>
</service>
</services>

View File

@ -0,0 +1,7 @@
<services>
<service name="download_url">
<param name="host">pypi.python.org</param>
<param name="protocol">https</param>
<param name="path">/packages/source/X/XStatic-jquery-ui/XStatic-jquery-ui-1.11.0.1.tar.gz</param>
</service>
</services>

View File

@ -0,0 +1,67 @@
%global pypi_name XStatic-jquery-ui
%{!?__python2:%global __python2 %{__python}}
%{!?python2_sitelib: %global python2_sitelib %{python_sitelib}}
%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}}
%{!?python2_version: %global python2_version %{python_version}}
Name: python-%{pypi_name}
Version: 1.11.0.1
Release: 2%{?dist}
Summary: jquery-ui (XStatic packaging standard)
# According
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
# http://creativecommons.org/publicdomain/zero/1.0/legalcode
# is abbreviated CCO.
# This package has the same license as jquery-ui:
# https://github.com/jquery/jqueryui.com/blob/master/LICENSE.txt
License: CCO
URL: http://jqueryui.com/
Source0: https://pypi.python.org/packages/source/X/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools
Requires: python-XStatic
%description
jquery-ui javascript library packaged for
setuptools (easy_install) / pip.
This package is intended to be used by
**any** project that needs these files.
It intentionally does **not** provide
any extra code except some metadata
**nor** has any extra requirements. You MAY
use some minimal support code from
the XStatic base package, if you like.
%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
# due https://bitbucket.org/thomaswaldmann/xstatic/issue/2/
# this package can not be built with python-XStatic installed.
%{__python2} setup.py build
%install
%{__python2} setup.py install --skip-build --root %{buildroot}
%files
%doc README.txt
%{python2_sitelib}/XStatic_jquery_ui-1.11.0.1-py%{python_version}.egg-info
%{python2_sitelib}/XStatic_jquery_ui-1.11.0.1-py%{python_version}-nspkg.pth
%{python2_sitelib}/xstatic/pkg/jquery_ui
%changelog
* Mon Oct 20 2014 Thomas NOEL <info@entrouvert.com> - 1.11.0.1-1
- update to 1.11.0.1
* Mon Oct 20 2014 EO <info@entrouvert.com> - 1.10.4.1-2
- dont use _jsdir
* Mon Aug 18 2014 Matthias Runge <mrunge@redhat.com> - 1.10.4.1-1
- Initial package (rhbz#1135430).

View File

@ -0,0 +1,7 @@
<services>
<service name="download_src_package">
<param name="host">fr2.rpmfind.net</param>
<param name="protocol">http</param>
<param name="path">/linux/fedora/linux/development/rawhide/source/SRPMS/p/python-XStatic-1.0.1-2.fc22.src.rpm</param>
</service>
</services>

View File

@ -0,0 +1,7 @@
<services>
<service name="download_url">
<param name="host">repos.entrouvert.org</param>
<param name="protocol">http</param>
<param name="path">/gadjo.git/snapshot/gadjo-3425188.tar.gz</param>
</service>
</services>

View File

@ -0,0 +1,49 @@
%define tag 0.2
%define commit 3425188
# si possible, minor = nombre de commit depuis le tag (à la "git describe")
%define minor 22
# si minor == 0
#%define version %{tag}
# sinon :
%define version %{tag}.%{minor}.g%{commit}
# %define _unpackaged_files_terminate_build 0
Name: python-django-gadjo
Version: %{tag}.%{minor}.g%{commit}
Release: 9%{?dist}
Summary: Django base template tailored for management interfaces
Group: Development/Languages
License: AGPLv3
URL: https://dev.entrouvert.org/projects/gadjo
Source0: gadjo-%{commit}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel python-django python-setuptools-devel
Requires: python-django python-XStatic python-XStatic-Font-Awesome python-XStatic-jQuery python-XStatic-jquery-ui
%description
Gadjo is a base template for Django applications, tailored for
management interfaces, built to provide a nice and modern look, while
using progressive enhancement and responsive designs to adapt to
different environments.
%prep
%setup -q -n gadjo-%{commit}
%build
%{__python} setup.py build
%install
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%files
%{python_sitelib}/gadjo
%{python_sitelib}/gadjo-*.egg-info
%doc COPYING README.txt AUTHORS
%changelog
* Sat Oct 18 2014 Entr'ouvert <info@entrouvert.org> - 0-1
- Initial release

View File

@ -0,0 +1,7 @@
<services>
<service name="download_url">
<param name="host">pypi.python.org</param>
<param name="protocol">http</param>
<param name="path">/packages/source/d/django-jsonfield/django-jsonfield-0.9.13.tar.gz</param>
</service>
</services>

View File

@ -0,0 +1,35 @@
Name: python-django-jsonfield
Version: 0.9.13
Release: 1%{?dist}
Summary: JSONField for django models
Group: Development/Languages
License: BSD
URL: http://pypi.python.org/pypi/django-jsonfield
Source: http://pypi.python.org/packages/source/d/django-jsonfield/django-jsonfield-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools-devel
Requires: python-django
%description
JSONField for django models
%prep
%setup -q -n django-jsonfield-%{version}
%build
%{__python} setup.py build
%install
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%files
%{python_sitelib}/jsonfield
%doc LICENSE README.rst
%{python_sitelib}/django_jsonfield-%{version}-py?.?.egg-info
%changelog
* Sat Oct 18 2014 Entr'ouvert <info@entrouvert.org> - 0.9.13-1
- Initial release

View File

@ -0,0 +1,7 @@
<services>
<service name="download_url">
<param name="host">repos.entrouvert.org</param>
<param name="protocol">http</param>
<param name="path">/python-entrouvert.git/snapshot/python-entrouvert-87131a8.tar.gz</param>
</service>
</services>

View File

@ -0,0 +1,41 @@
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define tag 6.2.0
%define minor 2
%define commit 87131a8
%define version %{tag}.%{minor}.g%{commit}
Name: python-entrouvert
Version: %{version}
Release: 0
Summary: tool modules used in projects of Entr'ouvert
License: GPLv3
Group: Development/Languages/Python
Url: https://dev.entrouvert.org/projects/python-entrouvert/
Source: python-entrouvert-%{commit}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel python-django python-setuptools-devel
%description
This package centralize tool modules used in projects of Entr'ouvert
%prep
%setup -q -n python-entrouvert-%{commit}
%build
%{__python} setup.py build
%install
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%files
%doc README
%{python_sitelib}/*
/usr/bin/check-git2python-packaging.sh
%changelog
* Wed Oct 22 2014 Entr'ouvert <info@entrouvert.org> - 0-1
- Initial release

View File

@ -0,0 +1,7 @@
<services>
<service name="download_src_package">
<param name="host">fr2.rpmfind.net</param>
<param name="protocol">ftp</param>
<param name="path">linux/fedora/linux/development/rawhide/source/SRPMS/t/ttembed-1.1-3.fc22.src.rpm</param>
</service>
</services>

View File

@ -2,6 +2,6 @@
<service name="download_url">
<param name="host">repos.entrouvert.org</param>
<param name="protocol">http</param>
<param name="path">/auquotidien.git/snapshot/auquotidien-53f5c62.tar.gz</param>
<param name="path">/auquotidien.git/snapshot/auquotidien-f91cae6.tar.gz</param>
</service>
</services>

View File

@ -1,9 +1,9 @@
%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define tag 1.10.2
%define commit 53f5c62
%define tag 1.12.5
%define commit f91cae6
# si possible, minor = nombre de commit depuis le tag (à la "git describe")
%define minor 0
%define minor 4
# si minor == 0
#%define version %{tag}

View File

@ -2,6 +2,6 @@
<service name="download_url">
<param name="host">repos.entrouvert.org</param>
<param name="protocol">http</param>
<param name="path">/wcs.git/snapshot/wcs-870cff1.tar.gz</param>
<param name="path">/wcs.git/snapshot/wcs-4ee347a.tar.gz</param>
</service>
</services>

View File

@ -1,14 +0,0 @@
diff --git a/wcs/forms/root.py b/wcs/forms/root.py
index e1215ea..346d33f 100644
--- a/wcs/forms/root.py
+++ b/wcs/forms/root.py
@@ -316,6 +316,9 @@ class FormPage(Directory):
session = get_session()
+ if get_request().get_method() == 'POST':
+ get_logger().debug('POST data: %r', get_request().form)
+
existing_formdata = None
if editing:
existing_formdata = editing.data

View File

@ -1,9 +1,9 @@
%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define tag 1.10.8
%define commit 870cff1
%define tag 1.12.5
%define commit 4ee347a
# si possible, minor = nombre de commit depuis le tag (à la "git describe")
%define minor 0
%define minor 42
# si minor == 0
#%define version %{tag}
@ -29,7 +29,6 @@ Requires(pre): shadow-utils
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/service, /sbin/chkconfig
Requires(postun): /sbin/service
Patch1: %{name}-log-post-form.patch
%description
@ -39,8 +38,6 @@ other skill than familiarity with web surfing
%prep
%setup -q -n wcs-%{commit}
%patch1 -p1
%pre
getent group wcs >/dev/null || groupadd -r wcs

View File

@ -0,0 +1,19 @@
Copyright 2013 T.C. Hollingsworth <tchollingsworth@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

View File

@ -0,0 +1,8 @@
web-assets-devel contains the RPM macros that implement the Fedora Web Assets
and JavaScript packaging policies.
For more information on packaging Web Assets, see:
https://fedoraproject.org/wiki/Packaging:Web_Assets
For more information on packaging JavaScript, see:
https://fedoraproject.org/wiki/Packaging:JavaScript

View File

@ -0,0 +1,13 @@
%_webassetdir %{_datadir}/web-assets
%_jsdir %{_datadir}/javascript
%js_includes() %{expand: \
%(
ver=$(rpm -q --qf='%%{version}' -- %1)
if [[ $? -eq 0 ]]; then
echo "Provides: js-includes(%1) = $ver"
else
echo "Provides: js-includes(%1)"
fi
)
}

View File

@ -0,0 +1,43 @@
<Directory /usr/share/web-assets>
Options -Indexes +FollowSymLinks
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>
<Directory /usr/share/javascript>
Options -Indexes +FollowSymLinks
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>
<Directory /usr/share/fonts>
Options -Indexes
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>
Alias /.sysassets/fonts /usr/share/fonts
Alias /.sysassets/javascript /usr/share/javascript
Alias /.sysassets/js /usr/share/javascript
Alias /.sysassets /usr/share/web-assets

View File

@ -0,0 +1,123 @@
#disable the httpd stuff while we're waiting on getting the path issues
#cleared up
%global enable_httpd 0
Name: web-assets
Version: 5
Release: 2%{?dist}
Summary: A simple framework for bits pushed to browsers
BuildArch: noarch
License: MIT
URL: https://fedoraproject.org/wiki/User:Patches/PackagingDrafts/Web_Assets
Source1: LICENSE
Source2: macros.web-assets
Source3: web-assets.conf
Source4: README.devel
%description
%{summary}.
%package filesystem
Summary: The basic directory layout for Web Assets
#there's nothing copyrightable about a few directories and symlinks
License: Public Domain
%description filesystem
%{summary}.
%package devel
Summary: RPM macros for Web Assets packaging
License: MIT
Requires: web-assets-filesystem = %{version}-%{release}
%description devel
%{summary}.
%if 0%{?enable_httpd}
%package httpd
Summary: Web Assets aliases for the Apache HTTP daemon
License: MIT
Requires: web-assets-filesystem = %{version}-%{release}
Requires: httpd
Requires(post): systemd
Requires(postun): systemd
%description httpd
%{summary}.
%endif
%prep
%setup -c -T
cp %{SOURCE1} LICENSE
cp %{SOURCE4} README.devel
%build
#nothing to do
%install
mkdir -p %{buildroot}%{_datadir}/web-assets
mkdir -p %{buildroot}%{_datadir}/javascript
ln -sf ../javascript %{buildroot}%{_datadir}/web-assets/javascript
ln -sf ../javascript %{buildroot}%{_datadir}/web-assets/js
ln -sf ../fonts %{buildroot}%{_datadir}/web-assets/fonts
install -Dpm0644 %{SOURCE2} %{buildroot}%{_rpmconfigdir}/macros.d/macros.web-assets
%if 0%{?enable_httpd}
install -Dpm0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/httpd/conf.d/web-assets.conf
%post httpd
systemctl reload-or-try-restart httpd.service || :
%postun httpd
systemctl reload-or-try-restart httpd.service || :
%endif
%files filesystem
%{_datadir}/web-assets
%{_datadir}/javascript
%files devel
%{_rpmconfigdir}/macros.d/macros.web-assets
%doc LICENSE README.devel
%if 0%{?enable_httpd}
%files httpd
%config(noreplace) %{_sysconfdir}/httpd/conf.d/web-assets.conf
%doc LICENSE
%endif
%changelog
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed Mar 19 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 5-1
- switch to dot-prefixed Aliases
- order Aliases for compatibility with older Apache releases
- enable webfonts
- enable symlinks in %%{_webassetdir} and %%{_jsdir}
- re-enable httpd subpackage
* Sat Aug 24 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 4-2
- tighten dependency on filesystem from other packages
- add brief README to -devel
* Fri Aug 16 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 4-1
- temporarily disable httpd stuff while we're waiting on sorting out the
directory
* Tue Jul 30 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 3-1
- rename directories per discussion on lists
- provide a /_sysassets/js shortcut
* Fri Jul 19 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2-1
- rename the license now that we have proper git
- prefix httpd-exported directory with an underscore (thanks to Joe Orton)
- add "Require all granted" (thanks to Remi Collet)
- alias /usr/share/javascript explictly
* Thu Jul 11 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1-1
- initial package