Compare commits

..

18 commits

Author SHA1 Message Date
Nils Philippsen
01b23788ea Merge branch 'master' into f26 2017-08-01 14:01:14 +02:00
Nils Philippsen
3cfc8f397b Merge remote-tracking branch 'github/master' into f26
In the process update references.
2017-08-01 13:59:20 +02:00
mkocka
683691c4e7 removing conficting packages 2017-07-07 15:07:02 +02:00
mkocka
0794f3c68e repairing conflicts 2017-06-27 12:39:21 +02:00
Petr Hracek
f179156b70 Merge pull request #3 from kosciCZ/master
Add modulemd file
2017-06-26 15:48:23 +02:00
Jan Koscielniak
81e5f7b137 Add modulemd file 2017-06-26 12:33:51 +02:00
mkocka
810faf7da8 removing nginx from components 2017-06-16 11:48:44 +02:00
Radoslav Pitoňák
04de990720 general tests in dist-git 2017-06-09 09:45:04 +02:00
Radoslav Pitonak
f8c3b4db33 general tests for module 2017-06-08 13:19:50 +02:00
Radoslav Pitonak
eb79cb598b fill content in README.md 2017-06-02 08:41:37 +02:00
rpitonak
04d4d21ae4 Initial commit 2017-06-02 08:28:12 +02:00
Petr Šabata
d3d9b86c80 Rebuilding for f26 signing
Signed-off-by: Petr Šabata <contyk@redhat.com>
2017-05-24 12:42:42 +02:00
mkocka
dcda12f964 removing s-u from build deps 2017-05-22 10:58:48 +02:00
mkocka
42838389f9 adding nginx as component 2017-05-14 23:54:09 +02:00
mkocka
ad5363812a nginx changed to master 2017-05-14 23:46:33 +02:00
mkocka
8176e05bde copy from master 2017-05-14 23:44:17 +02:00
mkocka
0bcc6f3218 New modulemd 2017-05-14 22:55:23 +02:00
mkocka
e7eb65a0e1 First commit php.yaml and deps in README.md 2017-04-11 10:33:01 +02:00
8 changed files with 228 additions and 0 deletions

1
.gitignore vendored
View file

@ -0,0 +1 @@
*.idea*

8
Dockerfile Normal file
View file

@ -0,0 +1,8 @@
FROM baseruntime/baseruntime:latest
LABEL MAINTAINER Rado Pitonak <rpitonak@redhat.com>
RUN microdnf --nodocs install php && \
microdnf -y clean all
CMD bash

17
Makefile Normal file
View file

@ -0,0 +1,17 @@
IMAGE_NAME = php
MODULEMDURL=file://php.yaml
default: run
build:
docker build --tag=$(IMAGE_NAME) .
run: build
docker run -d $(IMAGE_NAME)
debug: build
docker run -it $(IMAGE_NAME) bash
test: build
cd tests; MODULE=docker MODULEMD=$(MODULEMDURL) URL="docker=$(IMAGE_NAME)" make all

23
README.md Normal file
View file

@ -0,0 +1,23 @@
# php module
[**Package DB** (owner)](https://admin.fedoraproject.org/pkgdb/package/modules/php/) |
[**F26 modulemd** (source)](http://pkgs.fedoraproject.org/cgit/modules/php.git/tree/php.yaml?h=f26) |
[**PDC** (result)](https://pdc.fedoraproject.org/rest_api/v1/unreleasedvariants/?active=True&variant_name=php)
PHP is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.
## Current state
| State | Description |
|-------|-------------|
| ✓ YES | **Build passes** in the infra (all build deps are ok) |
| ✓ YES | **Installs** on the Base Runtime (all runtime deps are ok) |
| ✗ NO | **No bootstrap** - uses only proper modules |
| ✓ YES | General **tests are in dist-git** |
| ✓ YES | General **tests pass** |
| ✗ NO | Meets the **Fedora Module Packaging Guidelines** |
### Notes
See [**PHP s2i image**](https://github.com/container-images/php) on github for more details.

97
php.yaml Normal file
View file

@ -0,0 +1,97 @@
document: modulemd
version: 1
data:
summary: PHP scripting language for creating dynamic web sites
description: PHP is an HTML-embedded scripting language. PHP attempts to make it
easy for developers to write dynamically generated web pages. PHP also
offers built-in database integration for several commercial and
non-commercial database management systems, so writing a
database-enabled webpage with PHP is fairly simple. The most common
use of PHP coding is probably as a replacement for CGI scripts.
The php package contains the module (often referred to as mod_php)
which adds support for the PHP language to Apache HTTP Server.
license:
module: [PHP and Zend and BSD]
dependencies:
buildrequires:
# base-runtime: f26
bootstrap: f26
common-build-dependencies: f26
# shared-userspace: f26
perl: f26
postgresql: f26
nginx: f26
httpd: f26
requires:
perl: f26
shared-userspace: f26
base-runtime: f26
httpd: f26
references:
community: https://docs.pagure.org/modularity/
documentation: https://github.com/modularity-modules/php
tracker: https://github.com/modularity-modules/php
profiles:
default:
rpms:
- php
api:
rpms:
- php
filter:
rpms:
- php-dba
- php-devel
- php-enchant
- php-gd
- php-imap
- php-interbase
- php-mcrypt
- php-odbc
- php-pdo-dblib
- php-pspell
- php-recode
- php-snmp
- php-tidy
components:
rpms:
php:
rationale: php package.
ref: f26
buildorder: 10
# nginx:
# rationale: Provides API for this module.
# ref: f26
# buildorder: 2
# gperftools:
# rationale: dependency
# ref: f26
# buildorder: 1
# libmnl:
# rationale: dependency
# ref: f26
# buildorder: 1
# libnetfilter_conntrack:
# rationale: dependency
# ref: f26
# buildorder: 1
# libnfnetlink:
# rationale: dependency
# ref: f26
# buildorder: 1
# libunwind:
# rationale: dependency
# ref: f26
# buildorder: 1
libxkbcommon:
rationale: dependency
ref: f26
buildorder: 1
mailcap:
rationale: dependency
ref: f26
buildorder: 1
xkeyboard-config:
rationale: dependency
ref: f26
buildorder: 1

6
tests/Makefile Normal file
View file

@ -0,0 +1,6 @@
MODULE_LINT=/usr/share/moduleframework/tools/modulelint.py
CMD=python -m avocado run --filter-by-tags=-WIP $(MODULE_LINT) *.py
#
all:
$(CMD)

16
tests/config.yaml Normal file
View file

@ -0,0 +1,16 @@
document: modularity-testing
version: 1
name: php
modulemd-url: http://pkgs.fedoraproject.org/cgit/modules/php.git/plain/php.yaml?h=f26
service:
port: 8080
packages:
rpms:
- php
module:
docker:
start: "docker run -it"
container: php
rpm:
repos:
- http://mirror.vutbr.cz/fedora/releases/26/Everything/x86_64/os/

60
tests/sanity1.py Normal file
View file

@ -0,0 +1,60 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This Modularity Testing Framework helps you to write tests for modules
# Copyright (C) 2017 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# he Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Authors: Rado Pitonak <rpitonak@redhat.com>
#
from avocado import main
from avocado.core import exceptions
from moduleframework import module_framework
class SanityCheck(module_framework.AvocadoTest):
"""
:avocado: enable
"""
def testPhpBinary(self):
"""
Simple sanity test
"""
self.start()
self.run("ls /bin | grep php")
def test2PHPVersion(self):
"""
Check if PHP is installed in correct version
"""
version = "7."
self.start()
self.run("php -v | grep {}".format(version))
def testScriptExecution(self):
"""
Execute simple PHP script from CLI
"""
output = "Hello world!"
self.start()
self.assertIn(output, self.run("php -r 'echo \"{}\";'".format(output)).stdout)
if __name__ == '__main__':
main()