+ All Categories
Home > Documents > Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing...

Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing...

Date post: 12-Sep-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
31
Experiences with moving to open source standards for building and packaging Dennis van Dok, Mischa SallØ and Oscar Koeroo Nikhef Amsterdam SIGSOFTENG 2013, Nikhef, Amsterdam SIGSOFTENG 2013, Nikhef, Amsterdam 1 / 32
Transcript
Page 1: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Experiences with moving to opensource standards for building and

packaging

Dennis van Dok, Mischa Sallé and Oscar Koeroo

Nikhef Amsterdam

SIGSOFTENG 2013, Nikhef, Amsterdam

SIGSOFTENG 2013, Nikhef, Amsterdam 1 / 32

Page 2: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Software midwifery

SIGSOFTENG 2013, Nikhef, Amsterdam 2 / 32

Page 3: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Software midwifery II

SIGSOFTENG 2013, Nikhef, Amsterdam 3 / 32

Page 4: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Where we come from

I Middleware contributions in a series of EUfunded grid projects: DataGrid, EGEE (I,II and III), EMI and IGE.

I current sustained ‘maintenance mode’through SURF e-infrastructure.

r r r r r r r r r r r r r r r200020012002200320042005200620072008200920102011201220132014

︸ ︷︷ ︸Initiative for

Globus in

Europe

SIGSOFTENG 2013, Nikhef, Amsterdam 4 / 32

Page 5: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

The ETICS era

The EGEE era saw increased scale in every way:I the EGEE GridI the middleware stackI the code complexity and interdependencies

EGEE II had to deliver more reliable and stablesoftware. To manage this, a build system wasintroduced called ETICS.This system had a few shortcomings.

SIGSOFTENG 2013, Nikhef, Amsterdam 5 / 32

Page 6: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

ETICS’ shortcomings

I It was not easy to build outside of ETICSI Building in ETICS was too slow fordebugging/test cycles

I The system required specific m4 macros tobuild

I There was little or no focus on portabilityI The output consisted of binary products andno rebuildable source material.

I The ETICS project stopped in 2013 and theportal went off-line.

We had to do things ourselves.

SIGSOFTENG 2013, Nikhef, Amsterdam 6 / 32

Page 7: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

What we did

code improvements

I better m4 macros for dependency discoveryI stick to standards (ANSI C, POSIX, Autotools)I Build without compiler warningsI Implement secure coding standardsI active portability testing to many platforms(solving bugs along the way)

I documented software process

SIGSOFTENG 2013, Nikhef, Amsterdam 7 / 32

Page 8: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

what we also did

version control: imported all CVS history for ourcomponents from CERN CVS, with fullhistory

packaging and building: wrote Fedora and Debiancompliant packaging sources, builtnative packages suitable for inclusionin mainstream distributions

Implementation of guidelines: adopt Fedorapackaging guidelines and Debian Policy

automation: set up Koji for automated building

software delivery: deliver software through ourown (signed) repositories

improved documentation in the form of manpagesand Wiki pages.

SIGSOFTENG 2013, Nikhef, Amsterdam 8 / 32

Page 9: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

What we (eventually) managed

Most (autotools based) open source software cando this out of the box:

./configure

make

make install

We actually stuck to the mantra:

make distcheck

which builds outside the source tree and tests ifan install with DESTDIR works.

SIGSOFTENG 2013, Nikhef, Amsterdam 9 / 32

Page 10: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Fedora packaging

I Tagging in SVN (of the SPEC file) triggers a Kojibuild

I Koji does mock builds of the source and binaryRPMs for all targeted platforms, i.e. the latestFedora releases and EPEL5 and EPEL6.

I The builds are signed with a tool called sigul.I The mash utility generates the repositoriesthat can be installed through yum

koji, sigul and mash are also used by the Fedoraproject.

SIGSOFTENG 2013, Nikhef, Amsterdam 10 / 32

Page 11: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Debian packaging

For Debian, the procedure is slightly different.There is no equivalent of Koji for Debian /.

I a Debian source package is created forcurrently supported Ubuntu versions, Debianunstable, stable and oldstable,

I each source package is build withcowpoke/cowbuilder/pbuilder (equivalent tomock).

I the resulting packages are signed with thepackager’s GPG key

I The package is uploaded to a softwarerepository from where it can be installed withapt-get.

SIGSOFTENG 2013, Nikhef, Amsterdam 11 / 32

Page 12: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Catching common errors

For Fedora, use rpmlint; for Debian, lintian to seeif packages do not contain silly mistakes (lintianhelped find several common spelling errors.)

The automated build logs revealed more warningsdue to using different compiler settings.

This is not a substitute for real testing, of course.

SIGSOFTENG 2013, Nikhef, Amsterdam 12 / 32

Page 13: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Communi{ty,cation}

I Mailing listsWe’ve set up a few mailing lists:

I [email protected] forsupport questions and

I [email protected] forannouncements of new versions. This list hasan open subscription policy.

No general discuss mailing list (yet). . . nosizable community either (besides wLCG/EGIthere is OSG).

SIGSOFTENG 2013, Nikhef, Amsterdam 13 / 32

Page 14: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Sources, binaries and bugs

I Version control in SVNhttps://ndpfsvn.nikhef.nl/viewvc/mwsec/https://ndpfsvn.nikhef.nl/ro/mwsec/

I Download sourceshttp://software.nikhef.nl/security

I RPM/Deb distributionhttp://software.nikhef.nl/dist

I Bug trackingNEW: https://bugzilla.nikhef.nl/, movingaway from CERN Savannah.

SIGSOFTENG 2013, Nikhef, Amsterdam 14 / 32

Page 15: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Why we did it

Changes were implemented gradually over time,with each step bringing new benefits.Being good netizens and playing along withcommon open source practices is rewarding evenwithout drawing a crowd.Supporting OSG was much easier once we tookcontrol of the process.We believe we have greatly improvedsustainability of our software.

SIGSOFTENG 2013, Nikhef, Amsterdam 15 / 32

Page 16: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

What we got in return

Some of the benefits our work rendered:

1. playing fair with package management avoidsconflicts

2. installation of software becomes trivial

3. reproducing bugs becomes easier

4. pin-pointing bugs to source lines is easier

5. cycle time to deliver updates becomes shorter

6. uncovered some lurking bugs

7. improved portability

8. easier integration with third parties

9. using common technology makes it easier topass the support to future staff members.

SIGSOFTENG 2013, Nikhef, Amsterdam 16 / 32

Page 17: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

References

I Guide to setting up the Koji build systemhttp://fedoraproject.org/wiki/Koji/ServerHowTo

I Nikhef Security Access Control sofware procedureshttps://wiki.nikhef.nl/grid/SAC_software_procedures

I Fedora packaging guidelineshttps://fedoraproject.org/wiki/Packaging:Guidelines

I Debian Policyhttp://www.debian.org/doc/debian-policy/

I Debian upstream guidehttps://wiki.debian.org/UpstreamGuide

SIGSOFTENG 2013, Nikhef, Amsterdam 17 / 32

Page 18: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Bonus item: How to tell if a FLOSSproject is doomed to FAIL

Original by Tom “Spot” Callaway; inspired byChromium.

How to tell if a FLOSS project is doomed to FAIL

Count along the POFs (Points Of Fail) to see howwell your project is doing. Our overall fail score:10 points.

SIGSOFTENG 2013, Nikhef, Amsterdam 18 / 32

Page 19: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Size

I The source code is more than 100 MB. +5I If the source code also exceeds 100 MB whenit is compressed +5

SIGSOFTENG 2013, Nikhef, Amsterdam 19 / 32

Page 20: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Source Control

I There is no publicly available source control(e.g. cvs, svn, bzr, git) +10

I There is publicly available source control, but:I There is no web viewer for it +5I There is no documentation on how to use it fornew users +5

I You’ve written your own source control for thiscode +30

I You don’t actually use the existing sourcecontrol +50

SIGSOFTENG 2013, Nikhef, Amsterdam 20 / 32

Page 21: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Building From Source

I There is no documentation on how to build from source +20I If documentation exists on how to build from source, but itdoesn’t work +10

I Your source is configured with a handwritten shell script +10I Your source is configured editing flat text config files +20I Your source is configured by editing code header files manually+30

I Your source isn’t configurable +50I Your source builds using something that isn’t GNU Make +10I Your source only builds with third-party proprietary build tools+50

I You’ve written your own build tool for this code +100

SIGSOFTENG 2013, Nikhef, Amsterdam 21 / 32

Page 22: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Bundling

I Your source only comes with other codeprojects that it depends on +20

I If your source code cannot be built withoutfirst building the bundled code bits +10

I If you have modified those other bundled codebits +40

SIGSOFTENG 2013, Nikhef, Amsterdam 22 / 32

Page 23: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Libraries

I Your code only builds static libraries +20I Your code can build shared libraries, but onlyunversioned ones +20

I Your source does not try to use systemlibraries if present +20

SIGSOFTENG 2013, Nikhef, Amsterdam 23 / 32

Page 24: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

System Install

I Your code tries to install into /opt or /usr/local+10

I Your code has no “make install” +20I Your code doesn’t work outside of the sourcedirectory +30

SIGSOFTENG 2013, Nikhef, Amsterdam 24 / 32

Page 25: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Code Oddities

I Your code uses Windows line breaks (“DOSformat” files) +5

I Your code depends on specific compilerfeature functionality +20

I Your code depends on specific compiler bugs+50

I Your code depends on Microsoft VisualAnything +100

SIGSOFTENG 2013, Nikhef, Amsterdam 25 / 32

Page 26: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Communication

I Your project does not announce releases on amailing list +5

I Your project does not have a mailing list +10I Your project does not have a bug tracker +20I Your project does not have a website +50I Your project is sourceforge vaporware +100

SIGSOFTENG 2013, Nikhef, Amsterdam 26 / 32

Page 27: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

ReleasesI Your project does not do sanely versioned releases (Major,Minor) +10

I Your project does not do versioned releases +20I Your project does not do releases +50I Your project only does releases as attachments in web forumposts +100

I Your releases are only in .zip format +5I Your releases are only in OSX .zip format +10I Your releases are only in .rar format +20I Your releases are only in .arj format +50I Your releases are only in an encapsulation format that youinvented. +100

I Your release does not unpack into a versioned top-leveldirectory (e.g. glibc-2.4.2/ ) +10

I Your release does not unpack into a top-level directory (e.g.glibc/ ) +25

I Your release unpacks into an absurd number of directories (e.g.home/johndoe/glibc-svn/tarball/glibc/src/) +50

SIGSOFTENG 2013, Nikhef, Amsterdam 27 / 32

Page 28: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

History

I Your code is a fork of another project +10I Your primary developers were not involvedwith the parent project +50

I Until open sourcing it, your code wasproprietary for:

I 1-2 years +10I 3-5 years +20I 6-10 years +30I 10+ years +50

SIGSOFTENG 2013, Nikhef, Amsterdam 28 / 32

Page 29: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Licensing

I Your code does not have per-file licensing+10

I Your code contains inherent licenseincompatibilities +20

I Your code does not have any notice oflicensing intent +30

I Your code doesn’t include a copy of the licensetext +50

I Your code doesn’t have a license +100

SIGSOFTENG 2013, Nikhef, Amsterdam 29 / 32

Page 30: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

Documentation

I Your code doesn’t have a changelog +10I Your code doesn’t have any documentation+20

I Your website doesn’t have any documentation+30

SIGSOFTENG 2013, Nikhef, Amsterdam 30 / 32

Page 31: Experiences with moving to open source standards for ...vincentb/res/sig/presenta... · 1.playing fair with package management avoids con˛icts 2.installation of software becomes

FAIL METER

Points of FAIL Verdict0 Perfect! All signs point to success!

5–25 You’re probably doing okay,but you could be better.

30–60 Babies cry when your code is downloaded65–90 Kittens die when your code is downloaded95–130 HONK HONK. THE FAILBOAT HAS ARRIVED!135+ So much fail, your code should have

its own reality TV show.

SIGSOFTENG 2013, Nikhef, Amsterdam 31 / 32


Recommended