Author Topic: [PCLinuxOS Wiki] Packaging for PCLinuxOS  (Read 1572 times)

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1171
Re: [PCLinuxOS Wiki] Packaging for PCLinuxOS
« Reply #15 on: December 13, 2012, 11:16:03 AM »
Thanks. Here are the corrections, please confirm if they are alright:
Quote
* Once you are comfortable here, try packaging libraries after understanding about them.
* Now you could try your hand at very complex and interlinked packaging tasks such as whole desktop environments, wine etc.
* At this level, you could try to package binary software such as graphic drivers etc.


Looks ok, maybe in addition to the last packaging a kernel



Quote
Software from source - Most of the software written by humans is in the form of a human readable language such as Assembly (low level), C / C++ (medium level), Java / Python (higher level or interpreted languages). However a computer will only understand instructions in machine language which is in binary form. So we need to convert the software from human readable languages to machine language. This is done by a method known generally as compiling / building.

    In case of low level or medium level languages, this conversion is done in the process of packaging by compiling / building.
    In case of higher level or interpreted languages, this conversion is done on the fly during their execution in the user's computer.
    Hence here the source is packaged as is.



Sorry that's not right probably my explanation wasn't the best.
I'll go a bit deeper.
Interpreted or scripting languages are interpreted by a interpreter which generates the binary code for execution. This happens on runtime when the user launches the program (that's also the reason why such programs have a longer startup time). So the user just gets the source code.

In case of java we have language which have to be compiled but you don't get a readable program for the machine. The java compiler generates so named byte-code which is readable for the jre. the jre translates the byte-code in the mashine code and that's the reason why java is so portable. the byte-code is always the same and is readable for every jre.
you probably will say both are the same after this description but they arn't. So you can't put together high level and interpreted that's like say a apple is a banana.  i think java isn't the best example but it's e.g. replaceable by C (see bit deeper). C become directly compiled to machine code.

i also think your definition of what is high medium and low level is not correct just check e.g. here http://en.wikipedia.org/wiki/High-level_programming_language just if you read the features part you will see that c/c++ are no medium level languages they also use array, variable, object (just c++), ....



I still need information about things with ?? hanging around them :)

Quote
A virtual environment is created inside the packager's computer where this source is compiled into binary form. This environment is as close to a standard PCLinuxOS installation as possible. (?? /src/rpm/BUILD or ?? _tmppath)
A virtual installation of the created software is done in another virtual environment representative of end user. (?? /src/rpm/BUILDROOT)





don't know whether "virtual" is the right word. the build environment is there like any other file and folder. at the beginning there is nothing special there just six empty folders if the build system is new. just a little explanation of the build process.

you call rpmbuild -ba ... from the SPEC folder which causes the extraction of the source code in the SOURCE folder into the BUILD folder. Also if the package has other sources like pictures or desktop files they will be copied to the BUILD folder also. In the BUILD folder is now a new folder which is mostly name <app name>-version there the build commands like configure make make install are executed. _tmppath or better %_tmppath points into the BUILDROOT folder or is the BUILDROOT folder. everything attached on this path becomes the folder name where the program will be installed.

this means if you launch %makeinstall_std (note the macro use) the package will be installed to %_tmppath/<nice name>. so like the definition in the spec file says this path becomes the buildroot. the structure of /usr, ..., subdirectories is created by the installer/makefile. If there is no installer you have to do the installation manual by using the install command or cp.

when the binary becomes packed everything in the buildroot folder is copied in the package. the package will be placed in RPMS/i586 except you have a noarch package which means we have a platform independent program for example a java program or a python program (but this behavior must be explicitly defined in the spec file by adding BuildArch: noarch) this will be placed in the noarch folder.

i don't know whether i understood the last sentence correctly but i hope the above answers it, too.
« Last Edit: December 13, 2012, 11:20:28 AM by ghostbunny »
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: [PCLinuxOS Wiki] Packaging for PCLinuxOS
« Reply #16 on: December 13, 2012, 11:49:26 AM »
I understand that it is best to avoid getting into language levels here. I will rework the paragraph again.

I am getting a better understanding of the ?? sections now. Will also rework that and get back.

It is a bit late and I need to hit the bed now. Will be back with the revisions tomorrow or the day after.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: [PCLinuxOS Wiki] Packaging for PCLinuxOS
« Reply #17 on: December 14, 2012, 09:24:47 AM »
Done some more fine tuning of those sections. It is getting beyond my level right now ;)
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: [PCLinuxOS Wiki] Packaging for PCLinuxOS
« Reply #18 on: February 03, 2013, 09:49:19 AM »
2 new sections about
- Gathering information
- Errors and Warnings
have been added. But they are very sparse at the moment.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6