Skip to content

Commit

Permalink
feat(pbconf): adapt to pb 0.15 and new fossology 3.3+
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Cornec committed Sep 20, 2019
1 parent e326309 commit 8a5f14f
Show file tree
Hide file tree
Showing 18 changed files with 547 additions and 10 deletions.
93 changes: 93 additions & 0 deletions pbconf/fossology.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
#
# Project Builder configuration file
# For project fossology
#
# "$Id: $"
#
#
#
# What is the project URL
#
#pburl fossology = svn://svn.fossology.org/fossology/devel
#pburl fossology = svn://svn+ssh.fossology.org/fossology/devel
#pburl fossology = cvs://cvs.fossology.org/fossology/devel
pbprojurl:
fossology: git+https://github.com/fossology/fossology.git
#pburl fossology = ftp://ftp.fossology.org/src/fossology-devel.tar.gz
#pburl fossology = file:///src/fossology-devel.tar.gz
#pburl fossology = dir:///src/fossology-devel
#
# Repository
pbrepo:
fossology: http://www.fossology.org/releases
#pbml fossology = [email protected]
#pbsmtp fossology = localhost
#
# Check whether project is well formed
# when downloading from ftp/http/...
# (containing already a directory with the project-version name)
#pbwf fossology = 1
#
#
# Packager label
#
pbpackager:
fossology: Bruno Cornec <[email protected]>
#
#
# For delivery to a machine by SSH (potentially the FTP server)
# Needs hostname, account and directory
#
sshhost:
fossology: localhost
sshlogin:
fossology: delivery
sshdir:
fossology: /var/ftp/pub/fossology
sshport:
fossology: 22
#
#
# Global version/tag for the project
#
projver:
fossology: 3.4.0
projtag:
fossology: 1
#
# Is it a test version or a production version
testver:
fossology: true
#
# Additional repository to add at build time
# addrepo centos-5-x86_64 = http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm,ftp://ftp.project-builder.org/test/centos/5/pb.repo
# addrepo centos-4-x86_64 = http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.x86_64.rpm,ftp://ftp.project-builder.org/test/centos/4/pb.repo
addrepo:
centos-7-x86_64: http://ftp.project-builder.org/centos/7/x86_64/pb.repo,http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
#
# Adapt to your needs:
# Optional if you need to overwrite the global values above
#
#pkgver fossology = stable
#pkgtag fossology = 3
# Hash of default package/package directory
defpkgdir:
fossology: !!str ""
# Hash of additional package/package directory
#extpkgdir minor-pkg = dir-minor-pkg
#
# List of files per pkg on which to apply filters
# Files are mentioned relatively to pbroot/defpkgdir
#filteredfiles fossology = Makefile.PL,configure.in,install.sh,fossology.8
#supfiles fossology = fossology.init
#
# For perl modules, names are different depending on distro
# Here perl-xxx for RPMs, libxxx-perl for debs, ...
# So the package name is indeed virtual
#namingtype fossology = perl
#
#addrepo rhel-5-i386 = http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm,ftp://ftp.project-builder.org/test/centos/5/pb.repo
#addrepo rhel-5-x86_64 = http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm,ftp://ftp.project-builder.org/test/centos/5/pb.repo
#addrepo centos-4-i386 = http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm,ftp://ftp.project-builder.org/test/centos/4/pb.repo
#addrepo centos-4-x86_64 = http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.x86_64.rpm,ftp://ftp.project-builder.org/test/centos/4/pb.repo
3 changes: 3 additions & 0 deletions pbconf/fossology/pbve.pre
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
echo "############################"
pwd
echo "############################"
16 changes: 6 additions & 10 deletions pbconf/fossology/rpm/fossology.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Source: PBSRC
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
Requires: fossology-web fossology-scheduler fossology-ununpack fossology-copyright fossology-buckets fossology-mimetype fossology-delagent fossology-wgetagent fossology-decider fossology-spdx2 fossology-reuser
#Recommends: fossology-decider, fossology-spdx2, fossology-reuser, fossology-ninka
BuildRequires: postgresql-devel >= 8.1.11,glib2-devel,libxml2,gcc,make,perl,rpm-devel,pcre-devel,openssl-devel,gcc-c++,php,boost-devel,php-phar,php-mbstring,php-xml,curl,PBBUILDDEP
BuildRequires: postgresql-devel >= 8.1.11,glib2-devel,libxml2,gcc,make,perl,rpm-devel,pcre-devel,openssl-devel,gcc-c++,php,boost-devel,php-phar,php-mbstring,php-xml,curl,jsoncpp-devel,libgomp-devel,json-c-devel,PBBUILDDEP
Summary: FOSSology is a license compliance analysis tool

#
Expand Down Expand Up @@ -291,19 +291,15 @@ cp VERSION $RPM_BUILD_ROOT%{_sysconfdir}/PBPROJ/
%files
%defattr(-,root,root)
# %doc ChangeLog # mcj todo not existing anymore, right?
%doc COPYING COPYING.LGPL README.md install/INSTALL install/INSTALL.multi NOTICES CONTRIBUTING.md CHANGELOG.md
%doc install/INSTALL install/INSTALL.multi NOTICES* *.md

%files common
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/cron.d/*
%config(noreplace) %{_sysconfdir}/PBPROJ/Db.conf
%config(noreplace) %{_sysconfdir}/PBPROJ/fossology.conf
%config(noreplace) %{_sysconfdir}/PBPROJ/VERSION
%config(noreplace) %{_sysconfdir}/PBPROJ/sampleheader.txt
%config(noreplace) %{_sysconfdir}/PBPROJ/samplefooter.txt
%dir %{_sysconfdir}/PBPROJ/mods-enabled
%config(noreplace) %{_sysconfdir}/PBPROJ/*
%dir %{_sysconfdir}/PBPROJ/conf
%config(noreplace) %{_sysconfdir}/PBPROJ/conf/*
%dir %{_sysconfdir}/PBPROJ/mods-enabled
%dir %{_usr}/lib/PBPROJ
%dir %{_datadir}/PBPROJ
%{_usr}/lib/PBPROJ/*
Expand All @@ -317,6 +313,8 @@ cp VERSION $RPM_BUILD_ROOT%{_sysconfdir}/PBPROJ/
%{_datadir}/PBPROJ/composer.json
%{_datadir}/PBPROJ/composer.lock
%{_datadir}/PBPROJ/vendor/*
%{_datadir}/PBPROJ/keyword/*
%{_datadir}/PBPROJ/ojo/*

%files unifiedreport
%{_sysconfdir}/PBPROJ/mods-enabled/unifiedreport
Expand All @@ -327,8 +325,6 @@ cp VERSION $RPM_BUILD_ROOT%{_sysconfdir}/PBPROJ/
%files reportimport
%{_sysconfdir}/PBPROJ/mods-enabled/reportImport
%{_datadir}/PBPROJ/reportImport/*
%{_datadir}/PBPROJ/reportImport/agent/*
%{_datadir}/PBPROJ/reportImport/ui/*

%files db
%defattr(-,root,root)
Expand Down
64 changes: 64 additions & 0 deletions pbconf/pbfilter/all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
#
# $Id$
#
# Filter for all files
#
#
# PBREPO is replaced by the root URL to access the repository
filter:
PBREALPKG: $pb->{'realpkg'}
PBTAG: $pb->{'tag'}
PBPGHBB: !!str ""
PBDESC: An open and modular architecture for analyzing software. Currently specializing on license detection.
PBPROJ: $pb->{'proj'}
PBPKG: $pb->{'pkg'}
PBVER: $pb->{'ver'}
PBREPO: $pb->{'repo'}
PBLOG: yes
PBURL: http://www.fossology.org
PBSTOP: stop
PBREV: $pb->{'rev'}
PBDATE: $pb->{'date'}
PBEXTDIR: $pb->{'extdir'}
PBBUILDDEP: !!str ""
PBFEDORAD: !!str ""
PBSRC: src/%{srcname}-%{version}$pb->{'extdir'}.tar.gz
PBPACKAGER: $pb->{'packager'}
#
# PBSRC is replaced by the source package format
#
# PBVER is replaced by the version ($pb->{'ver'} in code)
#
# PBDATE is replaced by the date ($pb->{'date'} in code)
#
# PBEXTDIR is replaced by the date ($pb->{'extdir'} in code)
#
# PBPATCHSRC is replaced by the patches names if value is yes. Patches are located under the pbpatch dir of the pkg.
#filter PBPATCHSRC = yes
#
# PBPATCHCMD is replaced by the patches commands if value is yes
#filter PBPATCHCMD = yes
#
# PBTAG is replaced by the tag ($pb->{'tag'} in code)
#
# PBREV is replaced by the revision ($pb->{'rev'} in code)
#
# PBREALPKG is replaced by the package name ($pb->{'realpkg'} in code)
#
# PBPKG is replaced by the package name ($pb->{'pkg'} in code)
#
# PBPROJ is replaced by the project name ($pb->{'proj'} in code)
#
# PBPACKAGER is replaced by the packager name ($pb->{'packager'} in code)
#
# PBDESC contains the description of the package
#
# PBURL contains the URL of the Web site of the project
#
# PBLOG is replaced by the changelog if value is yes
# and should be last as when used we need the %pb hash filled
#
# By default no build dependencies
#
# For fedora system
39 changes: 39 additions & 0 deletions pbconf/pbfilter/centos-6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
#
# $Id$
#
# Filter for rpm build
#
#
# PBGRP is replaced by the RPM group of apps
# Cf: http://fedoraproject.org/wiki/RPMGroups
filter:
PBSUF: $pb->{'suf'}
PBGRP: Applications/Engineering
PBFEDORAD: service postgresql initdb
PBBUILDDEP: perl-Text-Template,perl-podlators
PBPHPINI: /etc/php.ini
PBLIC: GPLv2
PBSTOP: inactive
PBREC: Recommends: upx
PBDEP: cabextract,genisoimage,sleuthkit,file
PBPGHBB: perl -pi -e 's|(host\s+all\s+all\s+::1/128\s+ident)|#$1|' /var/lib/pgsql/data/pg_hba.conf
PBPGHBA: perl -pi -e 's|(host\s+all\s+all\s+127.0.0.1/32\s+ident)|#$1|' /var/lib/pgsql/data/pg_hba.conf
#
# PBLIC is replaced by the license of the application
# Cf: http://fedoraproject.org/wiki/Licensing
#
# PBDEP is replaced by the list of dependencies
#
# PBBUILDDEP is replaced by the list of build dependencies
#
# PBSUF is replaced by the package suffix ($pbsuf'} in code)
#filter PBSUF = %{dist}
#
# PBOBS is replaced by the Obsolete line
#filter PBOBS =
#
#
#PBFEDORAD is on fedora system need initial DB
#
#PBPGHBA is change pg_hba files
39 changes: 39 additions & 0 deletions pbconf/pbfilter/centos-7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
#
# $Id$
#
# Filter for rpm build
#
#
# PBGRP is replaced by the RPM group of apps
# Cf: http://fedoraproject.org/wiki/RPMGroups
filter:
PBGRP: Applications/Engineering
PBSUF: $pb->{'suf'}
PBBUILDDEP: perl-Text-Template,perl-podlators,file-devel
PBFEDORAD: service postgresql initdb
PBSTOP: inactive
PBPHPINI: /etc/php.ini
PBLIC: GPLv2
PBPGHBA: perl -pi -e 's|(host\s+all\s+all\s+127.0.0.1/32\s+ident)|#$1|' /var/lib/pgsql/data/pg_hba.conf
PBPGHBB: perl -pi -e 's|(host\s+all\s+all\s+::1/128\s+ident)|#$1|' /var/lib/pgsql/data/pg_hba.conf
PBDEP: cabextract,genisoimage,sleuthkit,file
#
# PBLIC is replaced by the license of the application
# Cf: http://fedoraproject.org/wiki/Licensing
#
# PBDEP is replaced by the list of dependencies
#filter PBREC = Recommends: upx
#
# PBBUILDDEP is replaced by the list of build dependencies
#
# PBSUF is replaced by the package suffix ($pbsuf'} in code)
#filter PBSUF = %{dist}
#
# PBOBS is replaced by the Obsolete line
#filter PBOBS =
#
#
#PBFEDORAD is on fedora system need initial DB
#
#PBPGHBA is change pg_hba files
15 changes: 15 additions & 0 deletions pbconf/pbfilter/debian-6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
#
# $Id$
#
# Filter for debian build
#
# PBDEBSTD is replaced by the Debian standard version
filter:
PBDEBCOMP: 7
PBDEBSTD: 3.8.0
PBDEP: postgresql (>= 8.1) | postgresql-8.4 | postgresql-9.1
PBBUILDDEP: postgresql-server-dev-8.4
#
# PBDEBCOMP is replaced by the Debian Compatibility value
#
15 changes: 15 additions & 0 deletions pbconf/pbfilter/debian-7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
#
# $Id$
#
# Filter for debian build
#
# PBDEBSTD is replaced by the Debian standard version
filter:
PBDEBCOMP: 7
PBDEBSTD: 3.9.1
PBBUILDDEP: postgresql-server-dev-8.4
PBDEP: postgresql (>= 8.1) | postgresql-8.4 | postgresql-9.1
#
# PBDEBCOMP is replaced by the Debian Compatibility value
#
16 changes: 16 additions & 0 deletions pbconf/pbfilter/debian-8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
#
# $Id$
#
# Filter for debian build
#
# PBDEBSTD is replaced by the Debian standard version
filter:
PBDEBCOMP: 7
PBBUILDDEP: postgresql-server-dev-9.4,libjson0-dev
PBDEP: postgresql (>= 8.1) | postgresql-9.4
PBDEBSTD: 3.9.1
PBPHPCLI: php5-cli
#
# PBDEBCOMP is replaced by the Debian Compatibility value
#
16 changes: 16 additions & 0 deletions pbconf/pbfilter/debian-9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
#
# $Id$
#
# Filter for debian build
#
# PBDEBSTD is replaced by the Debian standard version
filter:
PBPHPCLI: php-cli,php-mbstring,php-xml
PBDEBSTD: 3.9.1
PBBUILDDEP: postgresql-server-dev-9.6,libjson-c-dev
PBDEP: postgresql (>= 8.1) | postgresql-9.6
PBDEBCOMP: 7
#
# PBDEBCOMP is replaced by the Debian Compatibility value
#
38 changes: 38 additions & 0 deletions pbconf/pbfilter/fedora-15.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
#
# $Id$
#
# Filter for rpm build
#
#
# PBGRP is replaced by the RPM group of apps
# Cf: http://fedoraproject.org/wiki/RPMGroups
filter:
PBSUF: $pb->{'suf'}
PBGRP: Applications/Engineering
PBBUILDDEP: file-libs,file-devel,perl-Text-Template
PBFEDORAD: /etc/init.d/postgresql initdb
PBLIC: GPLv2
PBPHPINI: /etc/php.ini
PBREC: Recommends: upx
PBDEP: cabextract,genisoimage,sleuthkit,file
PBPGHBA: perl -pi -e 's|(host\s+all\s+all\s+127.0.0.1/32\s+ident)|#$1|' /var/lib/pgsql/data/pg_hba.conf
PBPGHBB: perl -pi -e 's|(host\s+all\s+all\s+::1/128\s+ident)|#$1|' /var/lib/pgsql/data/pg_hba.conf
#
# PBLIC is replaced by the license of the application
# Cf: http://fedoraproject.org/wiki/Licensing
#
# PBDEP is replaced by the list of dependencies
#
# PBBUILDDEP is replaced by the list of build dependencies
#
# PBSUF is replaced by the package suffix ($pbsuf'} in code)
#filter PBSUF = %{dist}
#
# PBOBS is replaced by the Obsolete line
#filter PBOBS =
#
#
#PBFEDORAD is on fedora system need initial DB
#
#PBPGHBA is change pg_hba files
Loading

0 comments on commit 8a5f14f

Please sign in to comment.