Compare commits

..

No commits in common. "master" and "f28" have entirely different histories.

16 changed files with 799 additions and 1 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.idea

11
Dockerfile Normal file
View file

@ -0,0 +1,11 @@
FROM baseruntime/baseruntime:latest
COPY repos/* /etc/yum.repos.d/
RUN microdnf --nodocs --enablerepo perl install perl perl-devel && \
microdnf clean all
EXPOSE 8080
CMD /bin/bash

15
Makefile Normal file
View file

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

19
README.md Normal file
View file

@ -0,0 +1,19 @@
# perl module
[**Package DB** (owner)](https://admin.fedoraproject.org/pkgdb/package/modules/perl/) |
[**F26 modulemd** (source)](http://pkgs.fedoraproject.org/cgit/modules/perl.git/tree/perl.yaml?h=f26) |
[**PDC** (result)](https://pdc.fedoraproject.org/rest_api/v1/unreleasedvariants/?active=True&variant_name=perl)
Module containing important perl packages.
## 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) |
| ✓ YES | **No bootstrap** - uses only proper modules |
| ✓ YES | General **tests are in dist-git** |
| ✓ YES | General **tests pass** |
| ✗ NO | Meets the **Fedora Module Packaging Guidelines** |

View file

@ -1 +0,0 @@
Unsupported

496
perl.yaml Normal file
View file

@ -0,0 +1,496 @@
document: modulemd
version: 1
data:
summary: Practical Extraction and Report Language
description: >
Perl is a high-level programming language with roots in C, sed, awk
and shell scripting. Perl is good at handling processes and files, and
is especially good at handling text. Perl's hallmarks are practicality
and efficiency. While it is used to do a lot of different things,
Perl's most common applications are system administration utilities
and web programming.
license:
module: [ MIT ]
dependencies:
buildrequires:
platform: master
perl-bootstrap: master
requires:
platform: master
references:
community: https://docs.pagure.org/modularity/
documentation: https://github.com/modularity-modules/perl
tracker: https://github.com/modularity-modules/perl/issues
profiles:
default:
description: Interpreter and all Perl modules bundled within upstream Perl.
rpms:
- perl
minimal:
description: Only the interpreter as a standalone executable.
rpms:
- perl-interpreter
api:
rpms:
- perl
- perl-Archive-Tar
- perl-Attribute-Handlers
- perl-autodie
- perl-B-Debug
- perl-bignum
- perl-Carp
- perl-Compress-Raw-Bzip2
- perl-Compress-Raw-Zlib
- perl-Config-Perl-V
- perl-constant
- perl-CPAN
- perl-CPAN-Meta
- perl-CPAN-Meta-Requirements
- perl-CPAN-Meta-YAML
- perl-Data-Dumper
- perl-DB_File
- perl-devel
- perl-Devel-Peek
- perl-Devel-PPPort
- perl-Devel-SelfStubber
- perl-Digest
- perl-Digest-MD5
- perl-Digest-SHA
- perl-Encode
- perl-Encode-devel
- perl-encoding
- perl-Env
- perl-Errno
- perl-experimental
- perl-Exporter
- perl-ExtUtils-CBuilder
- perl-ExtUtils-Command
- perl-ExtUtils-Embed
- perl-ExtUtils-Install
- perl-ExtUtils-MakeMaker
- perl-ExtUtils-Manifest
- perl-ExtUtils-Miniperl
- perl-ExtUtils-MM-Utils
- perl-ExtUtils-ParseXS
- perl-File-Fetch
- perl-File-Path
- perl-File-Temp
- perl-Filter
- perl-Filter-Simple
- perl-generators
- perl-Getopt-Long
- perl-HTTP-Tiny
- perl-interpreter
- perl-IO
- perl-IO-Compress
- perl-IO-Socket-IP
- perl-IO-Zlib
- perl-IPC-Cmd
- perl-IPC-SysV
- perl-JSON-PP
- perl-libnet
- perl-libnetcfg
- perl-libs
- perl-Locale-Codes
- perl-Locale-Maketext
- perl-Locale-Maketext-Simple
- perl-macros
- perl-Math-BigInt
- perl-Math-BigInt-FastCalc
- perl-Math-BigRat
- perl-Math-Complex
- perl-Memoize
- perl-MIME-Base64
- perl-Module-CoreList
- perl-Module-CoreList-tools
- perl-Module-Load
- perl-Module-Load-Conditional
- perl-Module-Loaded
- perl-Module-Metadata
- perl-Net-Ping
- perl-open
- perl-Params-Check
- perl-parent
- perl-PathTools
- perl-Perl-OSType
- perl-perlfaq
- perl-PerlIO-via-QuotedPrint
- perl-Pod-Checker
- perl-Pod-Escapes
- perl-Pod-Html
- perl-Pod-Parser
- perl-Pod-Perldoc
- perl-Pod-Simple
- perl-Pod-Usage
- perl-podlators
- perl-Scalar-List-Utils
- perl-SelfLoader
- perl-Socket
- perl-Storable
- perl-Sys-Syslog
- perl-Term-ANSIColor
- perl-Term-Cap
- perl-Test
- perl-Test-Harness
- perl-Test-Simple
- perl-tests
- perl-Text-Balanced
- perl-Text-ParseWords
- perl-Text-Tabs+Wrap
- perl-Thread-Queue
- perl-threads
- perl-threads-shared
- perl-Time-HiRes
- perl-Time-Local
- perl-Time-Piece
- perl-Unicode-Collate
- perl-Unicode-Normalize
- perl-utils
- perl-version
buildopts:
rpms:
macros: |
%_with_perl_enables_groff 1
%_without_perl_enables_syslog_test 1
%_with_perl_enables_systemtap 1
%_without_perl_enables_tcsh 1
%_without_perl_Compress_Bzip2_enables_optional_test 1
%_without_perl_CPAN_Meta_Requirements_enables_optional_test 1
%_without_perl_IPC_System_Simple_enables_optional_test 1
%_without_perl_LWP_MediaTypes_enables_mailcap 1
%_without_perl_Module_Build_enables_optional_test 1
%_without_perl_Perl_OSType_enables_optional_test 1
%_without_perl_Pod_Perldoc_enables_tk_test 1
%_without_perl_Software_License_enables_optional_test 1
%_without_perl_Sys_Syslog_enables_optional_test 1
%_without_perl_Test_Harness_enables_optional_test 1
%_without_perl_Test_Simple_enables_optional_test 1
%_without_perl_URI_enables_Business_ISBN 1
components:
rpms:
# We can rebuild in a random order because we have all binary
# packages available from perl-bootstrap.
perl:
rationale: The Perl interpreter.
ref: master
perl-Algorithm-Diff:
rationale: A run-time dependency.
ref: master
perl-Archive-Tar:
rationale: Core Perl API.
ref: master
perl-Archive-Zip:
rationale: A run-time dependency.
ref: master
perl-autodie:
rationale: Core Perl API.
ref: master
perl-B-Debug:
rationale: Core Perl API.
ref: master
perl-bignum:
rationale: Core Perl API.
ref: master
perl-Carp:
rationale: Core Perl API.
ref: master
perl-Compress-Bzip2:
rationale: A run-time dependency.
ref: master
perl-Compress-Raw-Bzip2:
rationale: Core Perl API.
ref: master
perl-Compress-Raw-Zlib:
rationale: Core Perl API.
ref: master
perl-Config-Perl-V:
rationale: Core Perl API.
ref: master
perl-constant:
rationale: Core Perl API.
ref: master
perl-CPAN:
rationale: Core Perl API.
ref: master
perl-CPAN-Meta:
rationale: Core Perl API.
ref: master
perl-CPAN-Meta-Requirements:
rationale: Core Perl API.
ref: master
perl-CPAN-Meta-YAML:
rationale: Core Perl API.
ref: master
perl-Data-Dumper:
rationale: Core Perl API.
ref: master
perl-Data-OptList:
rationale: A run-time dependency.
ref: master
perl-Data-Section:
rationale: A run-time dependency.
ref: master
perl-DB_File:
rationale: Core Perl API.
ref: master
perl-Devel-PPPort:
rationale: Core Perl API.
ref: master
perl-Devel-Size:
rationale: A run-time dependency.
ref: master
perl-Digest:
rationale: Core Perl API.
ref: master
perl-Digest-MD5:
rationale: Core Perl API.
ref: master
perl-Digest-SHA:
rationale: Core Perl API.
ref: master
perl-Encode:
rationale: Core Perl API.
ref: master
perl-Env:
rationale: Core Perl API.
ref: master
perl-experimental:
rationale: Core Perl API.
ref: master
perl-Exporter:
rationale: Core Perl API.
ref: master
perl-ExtUtils-CBuilder:
rationale: Core Perl API.
ref: master
perl-ExtUtils-Install:
rationale: Core Perl API.
ref: master
perl-ExtUtils-MakeMaker:
rationale: Core Perl API.
ref: master
perl-ExtUtils-Manifest:
rationale: Core Perl API.
ref: master
perl-ExtUtils-ParseXS:
rationale: Core Perl API.
ref: master
perl-Fedora-VSP:
rationale: A run-time dependency.
ref: master
perl-File-Fetch:
rationale: Core Perl API.
ref: master
perl-File-HomeDir:
rationale: A run-time dependency.
ref: master
perl-File-Path:
rationale: Core Perl API.
ref: master
perl-File-Temp:
rationale: Core Perl API.
ref: master
perl-File-Which:
rationale: A run-time dependency.
ref: master
perl-Filter:
rationale: Core Perl API.
ref: master
perl-Filter-Simple:
rationale: Core Perl API.
ref: master
perl-generators:
rationale: RPM dependency generator.
ref: master
perl-Getopt-Long:
rationale: Core Perl API.
ref: master
perl-HTTP-Tiny:
rationale: Core Perl API.
ref: master
perl-inc-latest:
rationale: A run-time dependency.
ref: master
perl-IO-Compress:
rationale: Core Perl API.
ref: master
perl-IO-Socket-IP:
rationale: Core Perl API.
ref: master
perl-IPC-Cmd:
rationale: Core Perl API.
ref: master
perl-IPC-System-Simple:
rationale: A run-time dependency.
ref: master
perl-IPC-SysV:
rationale: Core Perl API.
ref: master
perl-JSON-PP:
rationale: Core Perl API.
ref: master
perl-libnet:
rationale: Core Perl API.
ref: master
perl-local-lib:
rationale: A run-time dependency.
ref: master
perl-Locale-Codes:
rationale: Core Perl API.
ref: master
perl-Locale-Maketext:
rationale: Core Perl API.
ref: master
perl-Math-BigInt:
rationale: Core Perl API.
ref: master
perl-Math-BigInt-FastCalc:
rationale: Core Perl API.
ref: master
perl-Math-BigRat:
rationale: Core Perl API.
ref: master
perl-MIME-Base64:
rationale: Core Perl API.
ref: master
perl-Module-Build:
rationale: A run-time dependency.
ref: master
perl-Module-CoreList:
rationale: Core Perl API.
ref: master
perl-Module-Load:
rationale: Core Perl API.
ref: master
perl-Module-Load-Conditional:
rationale: Core Perl API.
ref: master
perl-Module-Metadata:
rationale: Core Perl API.
ref: master
perl-MRO-Compat:
rationale: A run-time dependency.
ref: master
perl-Package-Generator:
rationale: A run-time dependency.
ref: master
perl-Params-Check:
rationale: Core Perl API.
ref: master
perl-Params-Util:
rationale: A run-time dependency.
ref: master
perl-parent:
rationale: Core Perl API.
ref: master
perl-PathTools:
rationale: Core Perl API.
ref: master
perl-Perl-OSType:
rationale: Core Perl API.
ref: master
perl-perlfaq:
rationale: Core Perl API.
ref: master
perl-PerlIO-via-QuotedPrint:
rationale: Core Perl API.
ref: master
perl-Pod-Checker:
rationale: Core Perl API.
ref: master
perl-Pod-Escapes:
rationale: Core Perl API.
ref: master
perl-Pod-Parser:
rationale: Core Perl API.
ref: master
perl-Pod-Perldoc:
rationale: Core Perl API.
ref: master
perl-Pod-Simple:
rationale: Core Perl API.
ref: master
perl-Pod-Usage:
rationale: Core Perl API.
ref: master
perl-podlators:
rationale: Core Perl API.
ref: master
perl-Scalar-List-Utils:
rationale: Core Perl API.
ref: master
perl-Socket:
rationale: Core Perl API.
ref: master
perl-Software-License:
rationale: A run-time dependency.
ref: master
perl-Storable:
rationale: Core Perl API.
ref: master
perl-Sub-Exporter:
rationale: A run-time dependency.
ref: master
perl-Sub-Install:
rationale: A run-time dependency.
ref: master
perl-Sys-Syslog:
rationale: Core Perl API.
ref: master
perl-Term-ANSIColor:
rationale: Core Perl API.
ref: master
perl-Term-Cap:
rationale: Core Perl API.
ref: master
perl-Test-Harness:
rationale: Core Perl API.
ref: master
perl-Test-Simple:
rationale: Core Perl API.
ref: master
perl-Text-Balanced:
rationale: Core Perl API.
ref: master
perl-Text-Diff:
rationale: A run-time dependency.
ref: master
perl-Text-Glob:
rationale: A run-time dependency.
ref: master
perl-Text-ParseWords:
rationale: Core Perl API.
ref: master
perl-Text-Tabs+Wrap:
rationale: Core Perl API.
ref: master
perl-Text-Template:
rationale: A run-time dependency.
ref: master
perl-Thread-Queue:
rationale: Core Perl API.
ref: master
perl-threads:
rationale: Core Perl API.
ref: master
perl-threads-shared:
rationale: Core Perl API.
ref: master
perl-Time-HiRes:
rationale: Core Perl API.
ref: master
perl-Time-Local:
rationale: Core Perl API.
ref: master
perl-Unicode-Collate:
rationale: Core Perl API.
ref: master
perl-Unicode-Normalize:
rationale: Core Perl API.
ref: master
perl-URI:
rationale: A run-time dependency.
ref: master
perl-version:
rationale: Core Perl API.
ref: master

4
repos/fedora.repo Normal file
View file

@ -0,0 +1,4 @@
[fedora]
name=fedora
baseurl=https://mirrors.nic.cz/fedora/linux/development/26/Everything/x86_64/os/
enabled=0

4
repos/perl.repo Normal file
View file

@ -0,0 +1,4 @@
[perl]
name=perl
baseurl=https://kojipkgs.fedoraproject.org/repos/module-fcd86adc7a9c7e0a/latest/x86_64/
enabled=0

0
sources Normal file
View file

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)

13
tests/config.yaml Normal file
View file

@ -0,0 +1,13 @@
document: modularity-testing
version: 1
name: perl
modulemd-url: https://src.fedoraproject.org/cgit/modules/perl.git/plain/perl.yaml
service:
port: 8080
module:
docker:
start: "docker run -it"
container: perl
rpm:
repos:
- http://mirror.vutbr.cz/fedora/releases/26/Everything/x86_64/os/

47
tests/cpan.py Normal file
View file

@ -0,0 +1,47 @@
#
# 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 CpanCheck1(module_framework.AvocadoTest):
"""
:avocado: enable
"""
def testInstallPerlModule(self):
self.start()
self.run("microdnf --nodocs --enablerepo fedora install -y cpan cpanminus")
self.run("cpanm install --force Error")
self.run("perl -e \"use Error\"")
def testInstallCModule(self):
self.start()
# install cpan
self.run("microdnf --nodocs --enablerepo fedora install -y cpan cpanminus")
# install gcc and rpm-devel
self.run("microdnf --nodocs --enablerepo fedora install -y gcc rpm-devel")
# install random c module
self.run("cpanm install --force RPM2")
self.run("perl -e \"use RPM2\"")
if __name__ == '__main__':
main()

35
tests/microdnfinside.py Normal file
View file

@ -0,0 +1,35 @@
#!/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: Jan Scotka <jscotka@redhat.com>
#
from moduleframework import module_framework
import os
class microDNFTest(module_framework.AvocadoTest):
"""
:avocado: enable
"""
def testInstallMicroDNFEmpty(self):
self.start()
self.assertIn("Transaction: (empty)",self.run("microdnf install microdnf", ignore_status=True).stdout)

56
tests/rpmvalidator.py Normal file
View file

@ -0,0 +1,56 @@
#!/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: Jan Scotka <jscotka@redhat.com>
#
from avocado import main
from moduleframework import module_framework
class ExampleRpmValidation(module_framework.AvocadoTest):
"""
:avocado: enable
"""
fhs_base_paths = [
'/bin',
'/boot',
'/dev',
'/etc',
'/home',
'/lib',
'/lib64',
'/media',
'/mnt',
'/opt',
'/proc',
'/root',
'/run',
'/sbin',
'/sys',
'/srv',
'/tmp',
'/usr/bin'
]
def testPaths(self):
self.start()
for directory in self.fhs_base_paths:
self.run("test -d %s" % directory)

45
tests/sanity1.py Normal file
View file

@ -0,0 +1,45 @@
#!/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 SanityCheck1(module_framework.AvocadoTest):
"""
:avocado: enable
"""
def test1(self):
self.start()
self.run("ls / | grep bin")
# check if perl is installed in the right version.
def test2PerlVersion(self):
perlVersion = "5.24"
module_framework.skipTestIf("perl" not in self.getActualProfile())
self.start()
self.run("perl -v | grep " + perlVersion)
if __name__ == '__main__':
main()

47
tests/simpleTest.py Normal file
View file

@ -0,0 +1,47 @@
#!/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: Jan Scotka <jscotka@redhat.com>
#
from moduleframework import module_framework
import os
class simpleTests(module_framework.AvocadoTest):
"""
:avocado: enable
"""
def testPath(self):
print ">>>>>>>>>>>>>> ", module_framework.__file__
print ">>>>>>>>>>>>>> ", __file__
def testAssertIn(self):
self.start()
self.assertIn("sbin", self.run("ls /").stdout)
def testInsideModule(self):
self.start()
self.assertEqual("a", self.run("echo a").stdout.strip())
def testCommandOnHost(self):
self.start()
self.assertEqual("a", self.runHost("echo a").stdout.strip())