This is for new development and discussions.

Moderators: slax, siamer

Re: PCLinuxOS RPM packaging crash-course

Postby slax » Thu Sep 15, 2011 10:00 am

Well yes, we basically program the .spec file to repeat the process we manually did.
So, for instance, to change the terminal colors, we should see how can this be automated... So one can write a script that changes the colors and is triggered by .spec file, or add edited terminal conf file which later replaces the default one upon rpm installation.

So, later i'll find some similar .spec file used for gtk theme package, and describe what would i do next.

Marc, give us the link of the gtk theme file you used. Or better yet, archive your zen theme and we'll create a package for that :)

PS: if it's not much trouble, i would be very happy to see that Chinese character in the orb logo ( the one like in Dragynn's sig) :oops:
slax
User avatar
Site Admin
Site Admin
 
Posts: 724
Joined: Wed Aug 18, 2010 2:55 pm
Location: ...somewhere out in space...

Re: PCLinuxOS RPM packaging crash-course

Postby mmesantos1 » Thu Sep 15, 2011 11:26 am

slax wrote:Well yes, we basically program the .spec file to repeat the process we manually did.
So, for instance, to change the terminal colors, we should see how can this be automated... So one can write a script that changes the colors and is triggered by .spec file, or add edited terminal conf file which later replaces the default one upon rpm installation.

So, later i'll find some similar .spec file used for gtk theme package, and describe what would i do next.

Marc, give us the link of the gtk theme file you used. Or better yet, archive your zen theme and we'll create a package for that :)

PS: if it's not much trouble, i would be very happy to see that Chinese character in the orb logo ( the one like in Dragynn's sig) :oops:


Hi Slax,
Ok when I get home from work I will archive the theme file and upload for you. As for the Chinese logo did you want me to make a wall with that logo or did you just want the orb logo by itself, please specify, sorry to be so dense, just want to make sure I understnad your request. :oops: :)
Also do you have the Chinese Logo on transparent background or if you can tell me what font was used so I can make it myself. :D Let me know and I will proceed from there. :D
Image
mmesantos1
User avatar
Full Member
Full Member
 
Posts: 67
Joined: Thu Mar 12, 2009 5:44 pm
Location: Virginia, USA

Re: PCLinuxOS RPM packaging crash-course

Postby konaexpress » Thu Sep 15, 2011 11:59 am

The logo, is there an svg file for it? That would help others to make wallpapers for it. Maybe not for the distro but for other users to download. Also, see what LKJ on the mother site can do. Just a thought.

If someone has a large jpg or png, I could pull it into Inkscape and trace it out. I think you can also put it into Blender and render a 3D version of it too.
konaexpress
User avatar
Sr. Member
Sr. Member
 
Posts: 441
Joined: Mon Sep 12, 2011 4:35 pm

Re: PCLinuxOS RPM packaging crash-course

Postby slax » Fri Sep 16, 2011 11:03 am

It's a Chinese character for Zen
http://www.google.com/search?hl=en&nord ... a=N&tab=wi

but i can't find svg version :( maybe we can trace it in inkscape?

@mmsantos1 - Yes i meant a full wallpaper with orb and zen char in it :) It would be cool to create some zen identity for release
slax
User avatar
Site Admin
Site Admin
 
Posts: 724
Joined: Wed Aug 18, 2010 2:55 pm
Location: ...somewhere out in space...

Re: PCLinuxOS RPM packaging crash-course

Postby mmesantos1 » Fri Sep 16, 2011 11:28 am

You got it Slax, I will work on that for you once I am home from work. The walls I make did you want them all Dark or a mix, let me know and I will get them made up for you. :D
Image
mmesantos1
User avatar
Full Member
Full Member
 
Posts: 67
Joined: Thu Mar 12, 2009 5:44 pm
Location: Virginia, USA

Re: PCLinuxOS RPM packaging crash-course

Postby mmesantos1 » Fri Sep 16, 2011 11:29 am

Additional note, Once I make the Chinese Zen Logo I will save it in .SVG for you guys and upload it as well. :D
Image
mmesantos1
User avatar
Full Member
Full Member
 
Posts: 67
Joined: Thu Mar 12, 2009 5:44 pm
Location: Virginia, USA

Re: PCLinuxOS RPM packaging crash-course

Postby konaexpress » Fri Sep 16, 2011 12:07 pm

slax wrote:It's a Chinese character for Zen
http://www.google.com/search?hl=en&nord ... a=N&tab=wi

but i can't find svg version :( maybe we can trace it in inkscape?

@mmsantos1 - Yes i meant a full wallpaper with orb and zen char in it :) It would be cool to create some zen identity for release


I hope that says Zen and not deep fried duck!
konaexpress
User avatar
Sr. Member
Sr. Member
 
Posts: 441
Joined: Mon Sep 12, 2011 4:35 pm

Re: PCLinuxOS RPM packaging crash-course

Postby slax » Fri Sep 16, 2011 12:25 pm

We should consult some Chinese/Mandarin guy :D
slax
User avatar
Site Admin
Site Admin
 
Posts: 724
Joined: Wed Aug 18, 2010 2:55 pm
Location: ...somewhere out in space...

Re: PCLinuxOS RPM packaging crash-course

Postby konaexpress » Fri Sep 16, 2011 1:02 pm

slax wrote:We should consult some Chinese/Mandarin guy :D


Five Dollars!
konaexpress
User avatar
Sr. Member
Sr. Member
 
Posts: 441
Joined: Mon Sep 12, 2011 4:35 pm

Re: PCLinuxOS RPM packaging crash-course

Postby mmesantos1 » Fri Sep 16, 2011 6:10 pm

OK posted the items requested in the screenie thread. :D
Image
mmesantos1
User avatar
Full Member
Full Member
 
Posts: 67
Joined: Thu Mar 12, 2009 5:44 pm
Location: Virginia, USA

Re: PCLinuxOS RPM packaging crash-course

Postby slax » Sat Sep 17, 2011 11:36 am

Ok for starters we'll use the the .srpms of Neil's theme black-n-grey
http://dl.dropbox.com/u/2130268/task-th ... 11.src.rpm
(thanks Neil :) )

When you download the file, right click on it and choose "install srpm for build".
This action extracts the spec file to ~/src/rpm/SPECS and source archive to ~/src/rpm/SOURCES.

As you notice there is no source for this package. That is because this is meta package, that only serves to select other packages for the theme.

Do this step now, and later i'll edit the spec for our theme, and explain it.
slax
User avatar
Site Admin
Site Admin
 
Posts: 724
Joined: Wed Aug 18, 2010 2:55 pm
Location: ...somewhere out in space...

Re: PCLinuxOS RPM packaging crash-course

Postby mmesantos1 » Sat Sep 17, 2011 12:31 pm

Ok slax I will pick up with this once I finish spinning the Zen ISO for you with the theme changes. :D
Image
mmesantos1
User avatar
Full Member
Full Member
 
Posts: 67
Joined: Thu Mar 12, 2009 5:44 pm
Location: Virginia, USA

Re: PCLinuxOS RPM packaging crash-course

Postby ongoto » Fri Jun 29, 2012 8:03 pm

All of the above.
The "Eternal gem" link in my sig gives a simple plain english description of packaging for noobs too.
Image
--Only a penguin could make a nest out of some rocks--
--Twitter--
--An eternal gem ala Joble--
ongoto
User avatar
Hero Member
Hero Member
 
Posts: 962
Joined: Sun Mar 01, 2009 12:53 pm
Location: California, USA

Re: PCLinuxOS RPM packaging crash-course

Postby Sproggy » Mon Jul 02, 2012 2:09 pm

i know most of you guys are old hands at packaging ... but recently i had an irc session with a few of the Phinx users to get them started with packaging ... below is the log of that evening ... i thought it might be useful to you guys :D ... feel free to remove my message if it doesnt :D

21:30:02 <test_packager> just got my build machine set up
21:30:06 <test_packager> fresh install
21:30:21 <test_packager> Phinx 2012.04 RC2a ... fully updated
21:30:23 <Sproggy> look at you lol
21:30:52 <test_packager> Sproggy: using my old desktop computer
21:30:59 <test_packager> not yet
21:31:34 <test_packager> Sproggy: I installed pkg-utils-Thunar ... but that's as far as I know to go
21:31:47 <test_packager> after that, I'm a blank slate
21:31:59 <Sproggy> then lets get you a pretty easy package to start with

21:43:04 <test_packager> Sproggy: isn't there a collection of Xfce themes that I could repackage (lol ... doesn't even know what he's asking)
21:43:20 <Sproggy> first things first
21:43:31 <Sproggy> lets get you guys repackaging the task-xfce
21:43:48 <Sproggy> just added the src rpm to dropbox
21:44:05 <test_packager> ok ... so what do I do with that?
21:44:12 <Sproggy> go there with thunar ... right click on it and install srpm

21:45:02 <test_packager> so where did it go?

21:45:44 <Sproggy> it installs the srpm to your /home/user/src/spec & sources folders

21:46:30 <test_packager> wtf? I don't have a spec and sources folder that I can find

21:46:54 <test_packager> uop! found it

21:47:48 <test_packager> nuttin in the /sources folder ... but a spec file in the /spec folder

21:49:12 <Sproggy> you should find a file called 31-phinx-task-xfce.spec
21:49:14 <Sproggy> open it

21:49:19 <test_packager> yep ... done did

21:49:50 <Sproggy> as xfce is now at 4.10 we need to edit this file

21:50:05 <Sproggy> right at the top you will see version
21:50:13 <Sproggy> change it to show 4.10

21:50:41 <test_packager> k
21:50:57 <Sproggy> directly under that is release %mkrel 3
21:51:07 <test_packager> yep
21:51:11 <Sproggy> chage that to show release %mkrel 1

21:51:28 <test_packager> k ... what's that?
21:51:40 <Sproggy> %mkrel is the command in a specfile that shows increment in building of the package
21:52:05 <Sproggy> so for instance if a package was version 1 ... and release 1

21:52:07 <test_packager> and every time it's built it gets incremented upwards?

21:52:21 <Sproggy> and a patch to fix something broken in version 1 was released
21:52:47 <Sproggy> it would be added to the package so the package would be version 1 release 2
21:53:07 <test_packager> ok ... easy enough
21:53:14 <Sproggy> or if the toolchain gets rebuilt
21:53:20 <test_packager> ok
21:53:26 <Sproggy> the package would need be be built against the new toolchain
21:53:34 <Sproggy> so it would get a release update

21:54:24 <test_packager> ok

21:54:45 <Sproggy> ok the group tells Synaptic where to list the package inside the synaptic display

21:55:38 <Sproggy> license is obvious
21:55:39 <test_packager> k
21:55:48 <Sproggy> what ever the package is released under put it there
21:55:58 <test_packager> got it

21:56:31 <Sproggy> url ... well that can be changed now too http://phinxdesktop.slyip.net/phinxdesktop/

21:56:54 <test_packager> so BuildArch is the CPU architecture the app is designed for?
21:57:01 <Sproggy> yep
21:57:13 <Sproggy> noarch means it will run on any architecture

21:57:36 <test_packager> so if a program requires a specific architecture, you specify the minimum architecture here?
21:57:47 <Sproggy> yep
21:58:24 <test_packager> ok
21:58:26 <Sproggy> so if it is a 32bit package ... i586/i686 ... 64bit package ... x86_64 ... arm package ... arm ... and so on

21:59:20 <test_packager> so with noarch, it'll run on 32 or 64 bit?

21:59:34 <Sproggy> yep
21:59:43 <test_packager> cool
22:00:04 <Sproggy> ok are we good there
22:00:18 <test_packager> capiche!
22:00:35 <Sproggy> have you changed ya URL's?
22:00:43 <test_packager> yeppers

22:01:44 <Sproggy> Buildroot is the directory that rpm will build the new package in
22:02:16 <Sproggy> %{_tmppath}/%{name}-%{version}-buildroot
22:02:46 <Sproggy> = tmp/task-xfce-4.10-buildroot
22:03:27 <Sproggy> %(name) = name of package and %{version} = version of package
22:04:31 <Sproggy> so what ever you name your package and version you make it ... that will be the temp folder it is built in
22:04:56 <test_packager> ok

22:05:28 <Sproggy> there are 2 types of Requires
22:06:04 <Sproggy> Buildrequires .... they are what are called package dependencies
22:06:42 <Sproggy> and are what are required to get the package to build
22:07:31 <Sproggy> understand?

22:07:44 <test_packager> not exactly
22:07:59 <Sproggy> ok you have BuildRequires and Requires
22:08:08 <test_packager> ok
22:08:21 <Sproggy> this package has no BuildRequires but has Requires
22:08:31 <test_packager> ahhhh ,... that's what's throwing me off

22:08:47 <Sproggy> when you install this package ... whatever other packages you have as Requires will be installed alongside this package
22:09:29 <Sproggy> so when you install task-xfce ... you get all the packages required to give you the full xfce desktop
22:09:59 <test_packager> and BuildRequires needs a certain application to build, which is then deleted at the end of the installation?
22:10:13 <Sproggy> exactly
22:10:27 <test_packager> ok ... that makes sense

22:10:52 <Sproggy> but they are removed after the package is built
22:10:59 <Sproggy> rather than installed
22:11:05 <test_packager> ok
22:11:17 <Sproggy> but i will tell youmore about that when we come to finally building thi package
22:11:46 <Sproggy> if anything confuses you then please tell me
22:11:55 <Sproggy> i can try to explain it a bit easier

22:12:21 <test_packager> I think I get that one
22:12:23 <Sproggy> kool

22:14:07 <Sproggy> ok the current list of requires .... needs a bit of amending as some new things to go in ... and so other stuff to take out
22:14:35 <Sproggy> firstly you will see a Require for %{_lib}garcon0
22:14:58 <Sproggy> if you read the packaging tips in the srpms dropbox folder then you probably dont need that explaining
22:15:09 <Sproggy> if not then heres a little breakdown
22:15:28 <test_packager> what about libglade2.0_0 libgladeui1_9?
22:15:59 <Sproggy> as those files are specific to the 32bit or 64 bit version then they are named
22:16:53 <Sproggy> because i packaged the xfce stuff for both 32bit and 64bit to be identical then the lib names for xfce can use the universal idenfier
22:17:28 <test_packager> so both the 64 and 32 bit packages use the same spec file?
22:17:40 <Sproggy> yep
22:18:10 <Sproggy> but you will have to change the name of the libglade as they are different in the 32bit and 64bit repo's

22:19:06 <Sproggy> so the xfce libs that have %{lib} will not need to be changed as they will be builts as either lib for 32bit or lib64 for 64bit
22:19:43 <Sproggy> because of the %{lib} identifier
22:19:51 <Sproggy> does that make sense to you guys

22:19:52 <test_packager> ok ... and that is determined by BuildArch?
22:20:01 <Sproggy> no
22:20:12 <test_packager> then what determines that?
22:20:21 <Sproggy> that is determined by the Arch of the Build machine
22:20:28 <test_packager> ahhh

22:21:12 <test_packager> so IF I have a 64 bit machine but have a 32 bit OS installed, then the installed OS determines that
22:21:14 <test_packager> ??
22:21:23 <Sproggy> yes
22:21:34 <Sproggy> not the precessor
22:21:47 <test_packager> but if I have a 64 bit OS running on a 64 bit machine, then that determines that it'll be built for 64 bit, then
22:21:48 <test_packager> ok
22:21:55 <Sproggy> yep
22:22:13 <test_packager> I think this computer is only 32 bit, IIRC
22:23:12 <Sproggy> thats fine
22:23:21 <test_packager> ok ... cool
22:23:35 <Sproggy> ok no one is too confused i hope

22:24:21 <test_packager> same here ... will ask
22:24:36 <test_packager> lol ... I have no problems asking questions
22:24:50 <Sproggy> ok so we are gonna make some changes to this specfile
22:24:55 <test_packager> I figure if dumbarse Arch-hole can do this, so can I

22:25:25 <test_packager> She_Devil: we thought you went back to sleep

22:26:47 <Sproggy> ok the line that reads Requires: gtk-oxygen-molecule-xfce4 change that to show Requires: postler
22:27:15 <Sproggy> and then chage the line Requires: oygen-icon-theme to Requires: dexter

22:28:52 <test_packager> ok ... I'm caught up
22:29:12 <Sproggy> goto the line that reads Requires: xfswitch-plugin and delete it


22:34:05 <Sproggy> ok scroll down to the changelog section
22:34:16 <test_packager> k
22:34:33 <Sproggy> copy the first section of changleog
22:34:35 <Sproggy> * Sat Jan 28 2012 Sproggy <desproggster at gmail.com> 4.9.0-3phinx2012
22:34:35 <Sproggy> - update

22:35:17 <Sproggy> and paste it directly below where you copied it putting a return between them
22:35:43 <test_packager> okee-dokey

22:36:13 <Sproggy> all entries below Sat Jan 01 2012 can be deleted

22:36:57 <Sproggy> so you should now have something that looks like this
22:36:59 <Sproggy> * Sat Jan 28 2012 Sproggy <desproggster at gmail.com> 4.9.0-3phinx2012
22:36:59 <Sproggy> - update
22:36:59 <Sproggy> * Sat Jan 28 2012 Sproggy <desproggster at gmail.com> 4.9.0-3phinx2012
22:36:59 <Sproggy> - update
22:36:59 <Sproggy> * Fri Jan 27 2012 Sproggy <desproggster at gmail.com> 4.9.0-2phinx2012
22:36:59 <Sproggy> - update
22:36:59 <Sproggy> * Sun Jan 01 2012 Sproggy <desproggster at gmail.com> 4.9.0-1phinx2012
22:36:59 <Sproggy> - update

22:39:06 <Sproggy> ok the first entry of the changelog change to Sun 2012 yourname <your email address> 4.10-1phinx2012
22:39:39 <test_packager> k ... done

22:40:33 <Sproggy> now goto file and save

22:41:03 <test_packager> k ... done

22:41:25 <Sproggy> now you can exit mousepad
22:41:34 <Sproggy> and go back to your specs folder

22:42:00 <test_packager> k ... done
22:42:29 <Sproggy> normally in the old days this is where you'd have to open a terminal and start pounding away instructions

22:42:43 <Sproggy> thunar delivers us the luxury of not needing to do that anymore
22:42:50 <Sproggy> saving a lot of time and energy

22:43:06 <test_packager> cool
22:43:16 <Sproggy> locate your shiny new specfile and right click it
22:43:49 <test_packager> ok
22:44:07 <Sproggy> you will have a menu with lots of options

22:44:20 <test_packager> yep
22:44:25 <Sproggy> the ones that matter to your are from Install Dependencies down
22:44:47 <Sproggy> to Build All
22:44:54 <DarkEra> ok
22:45:01 <test_packager> ok
22:45:08 <Sproggy> these are your packaging commands for Packaging
22:45:13 <test_packager> ok

22:45:53 <Sproggy> if you have a Specfile that has BuildRequires ... you would use the command Install Dependencies to go and get the packages required to make this Specfile build
22:46:11 <test_packager> ok
22:46:16 <Sproggy> try it and tell me what it says to you
22:47:15 <test_packager> nothing to do for /home/maik/src/rpm/SPECS/31-phinx-task-xfce.spec

22:48:14 <test_packager> can only use a 3 letter month?
22:48:20 <Sproggy> yes

22:49:09 <Sproggy> now if we had BuildRequires within the Sepcfile
22:49:30 <Sproggy> it would say Do you wish to update your src list Y/n?

22:49:55 <test_packager> and you would answer yes?
22:50:06 <Sproggy> choosing Yes it would ask for your root password and it would run ... apt-get update
22:50:30 <test_packager> and install those BuildRequires

22:50:53 <Sproggy> choosing No ... it would skip above and goto the BuildRequires where it would ask you to confirm your are happy to Install these packages Y/n?
22:52:26 <Sproggy> choosing Yes it would then ask you 3 things are you sure Y/n? .... do you want to create a Remove Package Log Y/n? and for your root password
22:52:36 <Sproggy> where it would then install your need packages
22:53:21 <Sproggy> if you select No to any of those it's aborts the operation
22:53:27 <test_packager> ok
22:53:28 <Sproggy> everyone ok with that so far

22:50:43 <test_packager> would it remove them after it has been built?

22:54:01 <Sproggy> in our case we dont get this because we have no BuildRequires
22:54:20 <Sproggy> or alternatively the BuildRequires package is already installed on your PC

22:55:05 <Sproggy> so you may expect it to ask you if you want to install packages
22:55:12 <test_packager> ok
22:55:13 <Sproggy> but if they already on the system it wont

22:55:34 <test_packager> got it
22:55:38 <Sproggy> kool
22:56:40 <Sproggy> ok now there are a few options there to try i will list and expalin them

22:57:40 <Sproggy> Prepare Only = extracts any archives and copies any needed files to the Buildroot tmp folder
22:58:04 <Sproggy> Compile Only = Does the above and the tries to compile the package
22:58:31 <Sproggy> Prepare & Compile = Does the above also
22:59:21 <Sproggy> Prepare, Compile & Install = Does the above and then Installs the package to test it
22:59:28 <Sproggy> ^^^^ important 1
22:59:38 <Sproggy> something i do with all my packages
22:59:44 <Sproggy> and something PCLOS doesnt do
22:59:53 <test_packager> so probably the one you'll use the most
23:00:22 <Sproggy> yep
23:00:37 <Sproggy> Install Only = just installs the src ... doesnt gurantee to work
23:01:43 <Sproggy> List Check = Checks all files, packages, settings are correct to build package
23:02:00 <Sproggy> Build Binary will give you a binary package
23:03:31 <Sproggy> Build SRPM = will build just the srpm for if you are having problems ... it will include all files, spefile etc that you can put in the cant buil folder if you want some one else to have a crack at it for you
23:04:13 <Sproggy> Build All and create log file = Builds complete package and creates an output log file you can check if the package doesnt build with errors
23:04:41 <Sproggy> and finally Build All = will just build the package but wont log if you encounter any problems
23:04:52 <Sproggy> understood so far?

23:04:58 <test_packager> ok ... got it

23:05:27 <Sproggy> you are ready to build your package
23:05:39 <test_packager> so now Build All and create log file?
23:05:42 <Sproggy> right click and select Build All and create log

23:06:07 <test_packager> done
23:06:33 <Sproggy> there ya go .. ya first real package is created

23:07:01 <test_packager> woohoo! I have two wittle rpms in my RPM folder
23:07:22 <Sproggy> if you go to your folders and check in the RPMS and SRPMS folders you'll find your packages and your SRPM ready for building in the future
23:07:44 <test_packager> so now ... what do you want us to put everything? compressed with *.xz first???
23:08:10 <Sproggy> no

23:08:15 <Sproggy> i just need the SRPM

23:08:35 <Sproggy> which is why you have you own folders for you to place them into
23:08:36 <test_packager> does it need to be compressed?
23:08:39 <Sproggy> nope
23:08:45 <Sproggy> leave as is
23:08:58 <test_packager> ok ... it's there
23:09:10 <test_packager> so where does the xz compression come in at?
23:11:35 <test_packager> so where does the xz compression come in at, Sproggy?

23:12:19 <Sproggy> the xz compression comes in when you have src archives that are tar.bz2 or tar.gz
23:12:29 <test_packager> ahhh ... ok
23:12:30 <Sproggy> or zip
23:12:34 <DarkEra> ok
23:12:43 <Sproggy> you can right click them and instantly convert them
23:13:28 <Sproggy> or if you have an archive that you have extracted to add new icons too or a patched file ... you an right click the folder and create an xz archive of it
23:16:17 <Sproggy> and thats the masterclass for this evening

23:17:15 <test_packager> lol ... much appreciated, Sproggy ... now gotta see if I can figure out how to do an application
23:17:22 <Sproggy> ive worked hard to get the right click stuff perfect in thunar

23:17:35 <test_packager> looks like you've done a really good job
23:17:38 <Sproggy> to make the job easy peasy
23:17:42 <test_packager> yes, thanks Sproggy
23:17:56 <Sproggy> you'll have more yet
23:18:01 <Sproggy> thats just the easy stuff
Sproggy
Jr. Member
Jr. Member
 
Posts: 15
Joined: Tue Mar 18, 2008 1:59 pm

Re: PCLinuxOS RPM packaging crash-course

Postby ongoto » Tue Jul 03, 2012 12:31 am

Thank you Sproggy. :)
This will go in my handy dandy reference manual pile of notes thing.

Note to self: I really need to get organized.
Image
--Only a penguin could make a nest out of some rocks--
--Twitter--
--An eternal gem ala Joble--
ongoto
User avatar
Hero Member
Hero Member
 
Posts: 962
Joined: Sun Mar 01, 2009 12:53 pm
Location: California, USA

Previous
Forum Statistics

Who is online

Users browsing this forum: No registered users and 1 guest

Options

Return to Developer's board