Difference between revisions of "User:ReetP"

From SME Server
Jump to navigationJump to search
Line 1: Line 1:
 
Just me. ReetP aka John Crisp
 
Just me. ReetP aka John Crisp
  
 +
===Repos===
 
After adding repo data to the database update the configuration file:
 
After adding repo data to the database update the configuration file:
 
  signal-event yum-modify
 
  signal-event yum-modify
Line 60: Line 61:
 
  status disabled
 
  status disabled
 
</noinclude>
 
</noinclude>
 +
 +
===Building RPMs===
 +
 +
My src RPM import notes
 +
 +
Importing a srpm/contrib.
 +
 +
Big note. If you are importing a server package then you need the common dir from an existing server package and not a contrib - they are different
 +
 +
It helps to have a dir with some common CVS files in.
 +
 +
 +
 +
On your local build server (could be on your koozali shell)
 +
 +
mkdir -p ~/smecontribs/rpms/NewPackage/contribs10
 +
cd ~/smecontribs/rpms
 +
 +
Only required to add to CVS if it is totally new:
 +
cvs add NewPackage
 +
cd NewPackage
 +
 +
Then:
 +
cvs add contribs10
 +
cd contribs10
 +
 +
 +
We need to get a common directory & Makefile there - note this is for a contrib, not server package
 +
 +
cp -R ~/rpms/{another package}/contribs10/common ~/rpms/NewPackage/contribs10
 +
cp -R ~/rpms/{another package}/contribs10/Makefile ~/rpms/NewPackage/contribs10
 +
 +
Alternatively I already have a directory with these files in that I can re-use
 +
 +
cp -r ~/CVS_files/* ~/smecontribs/rpms/NewPackage/contribs10/
 +
 +
 +
Update the name in the Makefile:
 +
 +
perl -p -i -e 's/{another package}/NewPackage/g' Makefile
 +
 +
./common/cvs-import.sh -b contribs10 -m 'Initial import' NewPackage.src.rpm
 +
 +
make new-sources FILES="v-x.x.x.tar.gz"
 +
 +
cvs commit -m "Add updated sources file NewPackage"
 +
 +
Now, at this juncture it refused to mockbuild properly.
 +
 +
In the end I removed ALL the files in the NewPackage contribs10 dir and then did:
 +
 +
~/smecontribs/rpms/NewPackage/contribs10/
 +
rm -rf *
 +
cvs update -dPA
 +
 +
Then I did:
 +
 +
make clean;make prep; make mockbuild and it built
 +
 +
I then just did
 +
 +
make build
 +
 +
Note
 +
 +
To get the name of the distribution in the filename you need something like this in the spec file.
 +
 +
Note the Release version format
 +
 +
 +
%define name phpki
 +
%define version 0.82
 +
%define release 23
 +
Summary: Phpki is a simple certificate management suite
 +
Name: %{name}
 +
Version: %{version}
 +
Release: %{release}%{?dist}
 +
License: GNU GPL version 2
 +
URL: http://sourceforge.net/projects/phpki/
 +
Group: SMEserver/addon
 +
#wget http://www.fooweb.com/downloads/foo-3.6.431.tar.gz
 +
Source: phpki-0.82.tar.gz
 +
in the

Revision as of 15:43, 8 October 2020

Just me. ReetP aka John Crisp

Repos

After adding repo data to the database update the configuration file:

signal-event yum-modify

ReetP repo

db yum_repositories set reetp repository \
BaseURL https://www.reetspetit.com/smeserver/\$releasever \
EnableGroups no \
GPGCheck no \
Name "ReetP Repo" \
GPGKey https://www.reetspetit.com/RPM-GPG-KEY \
Visible yes \
status disabled


ReetP testing repo - here be Dragons. Not for production use.


db yum_repositories set reetpTest repository \
BaseURL https://www.reetspetit.com/smetest/\$releasever \
EnableGroups no \
GPGCheck no \
Name "ReetP Repo" \
GPGKey https://www.reetspetit.com/RPM-GPG-KEY \
Visible yes \
status disabled


Libreswan repo

db yum_repositories set libreswan repository \
BaseURL https://download.libreswan.org/binaries/rhel/6/x86_64/ \
EnableGroups no \
GPGCheck yes \
GPGKey https://download.libreswan.org/binaries/RPM-GPG-KEY-libreswan \
Name LibreSwan \
Visible yes \
status=disabled \


MC repo

db yum_repositories set mc repository \
BaseURL http://download.opensuse.org/repositories/home:/laurentwandrebeck:/mc/CentOS_6/ \
Name mc \
Visible yes \
status enabled \


NodeJS repo (latest is 10)

db yum_repositories set nodejs8 \
repository Name 'Node JS 8' \
BaseURL https://rpm.nodesource.com/pub_8.x/el/6/x86_64 \
EnableGroups no \
GPGCheck no \
Visible yes \
status disabled


Building RPMs

My src RPM import notes

Importing a srpm/contrib.

Big note. If you are importing a server package then you need the common dir from an existing server package and not a contrib - they are different

It helps to have a dir with some common CVS files in.


On your local build server (could be on your koozali shell)

mkdir -p ~/smecontribs/rpms/NewPackage/contribs10
cd ~/smecontribs/rpms

Only required to add to CVS if it is totally new:

cvs add NewPackage 
cd NewPackage

Then:

cvs add contribs10
cd contribs10


We need to get a common directory & Makefile there - note this is for a contrib, not server package

cp -R ~/rpms/{another package}/contribs10/common ~/rpms/NewPackage/contribs10
cp -R ~/rpms/{another package}/contribs10/Makefile ~/rpms/NewPackage/contribs10

Alternatively I already have a directory with these files in that I can re-use

cp -r ~/CVS_files/* ~/smecontribs/rpms/NewPackage/contribs10/


Update the name in the Makefile:

perl -p -i -e 's/{another package}/NewPackage/g' Makefile
./common/cvs-import.sh -b contribs10 -m 'Initial import' NewPackage.src.rpm
make new-sources FILES="v-x.x.x.tar.gz"
cvs commit -m "Add updated sources file NewPackage"

Now, at this juncture it refused to mockbuild properly.

In the end I removed ALL the files in the NewPackage contribs10 dir and then did:

~/smecontribs/rpms/NewPackage/contribs10/
rm -rf *
cvs update -dPA

Then I did:

make clean;make prep; make mockbuild and it built

I then just did

make build

Note

To get the name of the distribution in the filename you need something like this in the spec file.

Note the Release version format


%define name phpki %define version 0.82 %define release 23 Summary: Phpki is a simple certificate management suite Name: %{name} Version: %{version} Release: %{release}%{?dist} License: GNU GPL version 2 URL: http://sourceforge.net/projects/phpki/ Group: SMEserver/addon

  1. wget http://www.fooweb.com/downloads/foo-3.6.431.tar.gz

Source: phpki-0.82.tar.gz in the