This post appeared originally in our sysadvent series and has been moved here following the discontinuation of the sysadvent microsite

This post appeared originally in our sysadvent series and has been moved here following the discontinuation of the sysadvent microsite
Everything was ready. The deploy should have been clean and fast. But then, the developers had added just another language module. Not a big thing, just something you could have pulled down, and stashed somewhere below /usr/local. But then, there is this policy that was added early in the project process: All software should be packaged as rpm files. Sounded a dream for the ops people, this time we should get it done right. But for this single library, there are no packages to find. You’ve searched EPEL, you’ve been through rpmfusion, and you’ve googled them all, rpmfind, pbone, and even fedora but nope, no package to be found. So what do you do?
You could of course write the spec-file from scratch and build the package. But you should already be on your way home. Are there any shortcuts? Well, of course there are.
On your EL7 EPEL equipped buildbox, start by setting up an rpm build tree. You need to install the EPEL repositories, of course.
sudo yum install rpmdevtools
rpmdev-setuptree
Try cpanspec
! As a random example, we use the Perl module
DateTimeX::Seinfeld
:
sudo yum install cpanspec
cd ~/rpmbuild/SPECS
cpanspec -v --packager "Random J. Hacker <random@example.com>" DateTimeX::Seinfeld
sudo yum-builddep perl-DateTimeX-Seinfeld.spec
rpmbuild -bb Color-Palette-0.100003.tar.gz
Done! Next!
For easy python pip module packing, try pyp2rpm
. Here we use the kaptan
module as example, building it for python2.7:
sudo yum install pyp2rpm
sudo sed -i 's/http:/https:/g;' \
/usr/lib/python2.7/site-packages/pyp2rpm/settings.py # Yep, that's a bug
pyp2rpm -p2 kaptan > ~/rpmbuild/SPECS/python-kaptan.spec
sudo yum-builddep ~/rpmbuild/SPECS/python2-kaptan.spec
rpmbuild -bb ~/rpmbuild/SPECS/python2-kaptan.spec
For fast ruby gem packaging, we use gem2rpm
. Here we use another random example, a
gem called sawyer:
sudo yum install rubygem-gem2rpm
cd ~/rpmbuild/SOURCES
gem fetch sawyer
gem2rpm -t fedora-21-25 sawyer-0.8.1.gem -o ~/rpmbuild/SPECS/rubygem-sawyer.spec
rpmbuild -bb ~/rpmbuild/SPECS/rubygem-sawyer.spec
Note that we use the fedora templates. They tend to work quite well with both EL7 and EPEL.
For smart packaging of PHP pear modules, try the built-in function
make-rpm-spec. For this example, we use the Archive_Tar
module
sudo yum install php-pear-PEAR-Command-Packaging
cd ~/rpmbuild/SOURCES
pear download Archive_Tar
pear make-rpm-spec Archive_Tar-1.4.3.tgz
rpmbuild -bb php-pear-Archive-Tar.spec
Easy!
Open source i offentlig sektor - utmaningar, möjligheter och vägen framåt.
Denna artikel beskriver processen och lärdomarna från att släppa ett API som öppen källkod inom offentlig sektor. Projektet, som utvecklades för digitala nationella prov (“DNP”), visar hur öppen källkod kan stärka samarbete, transparens och innovation. Artikeln lyfter fram både möjligheter och utmaningar – från säkerhet och juridiska aspekter till kulturellt motstånd – och ger insikter för andra myndigheter som överväger liknande initiativ.
Slutsatsen är att öppen källkod ... [continue reading]