Author Topic: Source Code for PCLinuxOS? {PCLOS ALL ALL LFS}  (Read 1990 times)

Offline horusfalcon

  • Hero Member
  • *****
  • Posts: 997
  • Wayfarer of The Western Wastes
Source Code for PCLinuxOS? {PCLOS ALL ALL LFS}
« on: January 23, 2010, 09:57:55 PM »
Is there a way to obtain the source code for PCLinuxOS?

Here's why I'm asking:  I've been reading about Linux From Scratch, and it sounds like a great way to learn a lot about Linux from the ground up.  I'm just wondering if I could use the sources from PCLinuxOS (my favorite distro so far) as the base for an LFS system I would build over the next few months.

(I thought that per the GPL, the sources have to be available somewhere... I just haven't figured out where yet.)

Later On,
D
« Last Edit: December 31, 2010, 11:25:23 AM by horusfalcon »
"The Way is not a matter of knowing or not knowing.  One word to a wise man; one lash to a bright horse."

Dell Latitude D620, PCLinuxOS 2012.08 KDE4/LXDE, 3.2.18.pclos.bfs, specs here.

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: Source Code for PCLinuxOS?
« Reply #1 on: January 23, 2010, 10:01:11 PM »
yes, you can

i think this is the third post recently doing this question but i can't find the other posts  ???
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Online muungwana

  • Hero Member
  • *****
  • Posts: 6236
Re: Source Code for PCLinuxOS?
« Reply #2 on: January 23, 2010, 10:02:25 PM »
you can start looking here, source rpms are in sections starting with "SRPMS"

http://distro.ibiblio.org/pub/linux/distributions/texstar/pclinuxos/apt/pclinuxos/2007/
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Online kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3990
Re: Source Code for PCLinuxOS?
« Reply #3 on: January 24, 2010, 06:14:28 AM »
If you look at any of the public mirrors with a web browser you will be able to find the source RPMs. These contain the source tarballs, patches and the .spec file which tells the rpm system how to build them. As you want to do LFS you will probably want to extract the tarballs and patches for use elsewhere. The easiest way to do that is to set up an rpm build environment and 'install' the srpms into it. Then just copy the tarballs etc to wherever you want them. Look in the Packagers section for more info.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline gilado

  • Hero Member
  • *****
  • Posts: 524
Re: Source Code for PCLinuxOS?
« Reply #4 on: January 24, 2010, 03:28:27 PM »
I'm looking for the source code of kdeprint_cups.so
The library is in /usr/lib/kde3
I thought it would be part of kdeprint, and when I type kdeprint into synaptic's search box it lists kdebase

I downloaded
http://distro.ibiblio.org/pub/linux/distributions/texstar/pclinuxos/apt/pclinuxos/2007/SRPMS.kde/kdebase-3.5.10-10pclos2007.src.rpm
and installed it.  It got unpacked  into /usr/src/rpm/SOURCES ?

There, among kde patches and such, I found kdebase-3.5.10.tar.bz2.
Untarring this one reveals a directory kdebase-3.5.10/kdeprint/ and in it for example  kdeprintfax/

Alas, no kdeprint_cups sources


« Last Edit: January 24, 2010, 03:35:25 PM by gilado »

Offline gilado

  • Hero Member
  • *****
  • Posts: 524
Re: Source Code for PCLinuxOS?
« Reply #5 on: January 24, 2010, 03:56:56 PM »
found it, its in kdelibs

Offline horusfalcon

  • Hero Member
  • *****
  • Posts: 997
  • Wayfarer of The Western Wastes
Re: Source Code for PCLinuxOS? {PCLOS ALL ALL LFS}
« Reply #6 on: January 24, 2010, 04:24:08 PM »
you can start looking here, source rpms are in sections starting with "SRPMS"

http://distro.ibiblio.org/pub/linux/distributions/texstar/pclinuxos/apt/pclinuxos/2007/


Thanks!  I knew they were out there somewhere.

Quote from: kjpetrie
If you look at any of the public mirrors with a web browser you will be able to find the source RPMs. These contain the source tarballs, patches and the .spec file which tells the rpm system how to build them. As you want to do LFS you will probably want to extract the tarballs and patches for use elsewhere. The easiest way to do that is to set up an rpm build environment and 'install' the srpms into it. Then just copy the tarballs etc to wherever you want them. Look in the Packagers section for more info.


More good info!  Thank you so much!  I can see I have more reading to do:  I'm not so sure how to set up an RPM build environment - not to worry, though, because this little exercise of mine is all about learning how.  Thanks again.


Later On,
D
« Last Edit: December 31, 2010, 11:26:07 AM by horusfalcon »
"The Way is not a matter of knowing or not knowing.  One word to a wise man; one lash to a bright horse."

Dell Latitude D620, PCLinuxOS 2012.08 KDE4/LXDE, 3.2.18.pclos.bfs, specs here.

Online kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3990
Re: Source Code for PCLinuxOS?
« Reply #7 on: January 25, 2010, 05:25:12 AM »
I'm looking for the source code of kdeprint_cups.so
The library is in /usr/lib/kde3
I thought it would be part of kdeprint, and when I type kdeprint into synaptic's search box it lists kdebase

I downloaded
http://distro.ibiblio.org/pub/linux/distributions/texstar/pclinuxos/apt/pclinuxos/2007/SRPMS.kde/kdebase-3.5.10-10pclos2007.src.rpm
and installed it.  It got unpacked  into /usr/src/rpm/SOURCES ?

There, among kde patches and such, I found kdebase-3.5.10.tar.bz2.
Untarring this one reveals a directory kdebase-3.5.10/kdeprint/ and in it for example  kdeprintfax/

Alas, no kdeprint_cups sources





You installed it as root. You should never install an srpm as root, as it then becomes a potential bomb waiting to damage what is currently installed in your real system if it ever gets built by mistake. You need to go to the packagers section and learn how to create a build environment in your home directory into which rpms will install as your normal user. For the purposes of this thread it might be enough to create just the directories ~/src/rpm/SOURCES and ~/src/rpm/SPECS, but I don't know for sure.

Also, you don't have to download the source to see what files a package contains. Open a console and type "rpm -q --filesbypkg --all | grep -B 200 kdeprint_cups.so" to get the info you want. It'll take a while.
« Last Edit: January 25, 2010, 05:50:26 AM by kjpetrie »
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline gilado

  • Hero Member
  • *****
  • Posts: 524
Re: Source Code for PCLinuxOS?
« Reply #8 on: January 25, 2010, 09:07:53 AM »
How would it accidentally get built?
It is tarred and there are no makefiles or configure files outside the tarred packages?

I did need to unpackage the source as I actually wanted to read it...

"rpm -q --filesbypkg --all | grep -B 200 kdeprint_cups.so"  show all places where kdeprint_cups.so is mentioned, mostly what other packages depend on it, not what package provides it (and therefore may contain the source code for it.)

Perhaps you meant   "rpm -q --whatprovides kdeprint_cups.so"

Online kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3990
Re: Source Code for PCLinuxOS?
« Reply #9 on: January 25, 2010, 12:17:08 PM »
Accidents happen, and source and spec file sitting in your /usr/src/rpm tree is an accident waiting to happen. You would have to make a combination of other mistakes before it could happen, but you're one step nearer than it it weren't there.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline gilado

  • Hero Member
  • *****
  • Posts: 524
Re: Source Code for PCLinuxOS?
« Reply #10 on: January 25, 2010, 08:27:49 PM »
? := a tendency on the part of an individual or group toward excessive or irrational suspiciousness and distrustfulness ...

 ;D ;D

The only way to get this to interfere with the system is:
$ su -
# cd /usr/src/rpm/SOURCES
# tar -xf kdebase-3.5.10.tar.bz2
# cd kdebase-3.5.10
#  ./configure
# (also need to happen to have X sources installed)
# make
# make install

That ain't gonna happen by accident

Seriously, if the src.rpm wasn't meant to be installed in /usr/src then why does the rpm command install it there ?






Online kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3990
Re: Source Code for PCLinuxOS?
« Reply #11 on: January 26, 2010, 02:45:19 AM »
Because it has to simulate an installation to build the binary rpm, which will behave as if it were installed there. This is done in a simulated environment; never in the real build environment where it would quickly mess up the computer running the build.

And all those steps you listed will happen automatically if you run the spec file by mistake. If you later go on to build packages all you would have to do is make two mistakes when issuing a build command - be root and be in the wrong current directory. Admittedly that's a long shot but this forum does see posts from people who've been caught by the co-incidence of two unhappy circumstances.

I suggest you read up on packaging. Then you will appreciate the situation. Rpms are very powerful and in combination with root privilege can do absolutely anything to your computer that can be done. They therefore need to be treated with respect, and you need to know what they will do before you run them - which is why outside rpms are frowned on so much and why source rpms should never be installed as root, which is not what they are meant for.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf