rpm_packaging_workshop
LOGS
13:35:33 <mether> #startmeeting
13:35:33 <zodbot> Meeting started Fri Apr 16 13:35:33 2010 UTC.  The chair is mether. Information about MeetBot at http://wiki.debian.org/MeetBot.
13:35:34 <zodbot> Useful Commands: #action #agreed #halp #info #idea #link #topic.
13:35:47 <lafau_> #topic
13:35:57 <mether> #meetingtopic RPM Packaging Workshop
13:36:13 <mether> #meetingname RPM Packaging Workshop
13:36:14 <zodbot> The meeting name has been set to 'rpm_packaging_workshop'
13:36:34 <mether> #chair mether
13:36:35 <zodbot> Current chairs: mether
13:37:13 <mether> Hello everyone.  I am Rahul Sundaram,  a Fedora contributor and will be leading the RPM packaging workshop today
13:37:36 <mether> I will be basing this workshop on https://fedoraproject.org/wiki/A_Short_RPM_Tutorial
13:37:47 <franciscod> #link https://fedoraproject.org/wiki/A_Short_RPM_Tutorial
13:37:52 <mether> We will be packaging the classic GNU Hello program
13:37:58 <nmudgal> ok
13:38:07 <mether> As a first step, download http://ftp.gnu.org/gnu/hello/hello-2.5.tar.gz
13:38:18 <franciscod> #link http://ftp.gnu.org/gnu/hello/hello-2.5.tar.gz
13:38:45 <yevlempy> done
13:38:45 <nmudgal> done !
13:38:46 <mether> I assume you already have fedora-packager package installed on your system if not
13:38:48 <praveenkumar> done
13:38:52 <gotunandan> done
13:38:55 <mether> yum install fedora-packager
13:39:04 <nmudgal> mether: yes already installed !
13:39:04 <rtnpro> done
13:39:05 <praveenkumar> done
13:39:13 <franciscod> #info As a first step, download http://ftp.gnu.org/gnu/hello/hello-2.5.tar.gz
13:39:22 <franciscod> #info yum install fedora-packager
13:39:45 <mether> You are free to ask questions in between and I encourage that but please ask one at a time
13:39:59 <praveenkumar> ok
13:40:00 <nmudgal> mether: :) okay !
13:40:14 <franciscod> please put your hand up "!" when you want to ask a question :)
13:40:32 <praveenkumar> ok
13:40:38 <mether> open up a terminal
13:40:42 <mether> and in your home directory
13:40:43 <mether> run
13:40:58 <mether> rpmdev-setuptree
13:41:16 <franciscod> #info rpmdev-setuptree
13:41:38 <mether> you should have now have a directory called rpmbuild in your home directory
13:42:18 <mether> with a bunch of sub directories - BUILD SPECS SRPMS RPMS and so on
13:42:38 <mether> these are all empty directories and just a environment for you to build the packages
13:42:54 <mether> you will have have a configuration file called .rpmmacros in your home directory
13:43:04 <mether> cat .rpmmacros to take a look at it
13:43:11 <nmudgal> mether: yes
13:43:26 <praveenkumar> mether: yeah
13:43:39 <nmudgal> yes !
13:43:47 <mether> mv the source file (ie) hello-2.5.tar.gz  to rpmbuild/SOURCES
13:44:16 <mether> once you have done that
13:44:35 <mether> untar it
13:44:41 <nmudgal> mether: done
13:45:00 <mether> tar xvf hello-2.5.tar.gz
13:45:02 <fridayblue> mether: am lale to the party
13:45:03 <praveenkumar> mether: done
13:45:08 <rtnpro> dine
13:45:13 <rtnpro> s/dine/done
13:45:19 <mether> franciscod, pass fridayblue the log so far
13:45:47 <franciscod> okay
13:46:06 <mether> what we have here is a simple hello world program but it is not entirely trivial because it uses autotools so that you can do the standard configure;make;make install dance to build the binary
13:46:17 <mether> it also has the translations and other files inside the archive
13:46:38 <mether> now that you have seen what is inside the archive
13:46:42 <mether> the next step
13:46:47 <salvachn> hi. just got home from a test. logging on to this irc class :-)
13:46:51 <mether> is to create a RPM package
13:47:05 <mether> franciscod, pass salvachn and narendra the logs please
13:47:07 <salvachn> mether, we've to download the tarball and look into it?
13:47:26 <mether> salvachn, franciscod will give you the log and you can follow on
13:47:39 <salvachn> ok.
13:47:45 <narendra> i am in,,
13:47:49 <nmudgal> mether: hmm
13:47:54 <franciscod> logs http://fpaste.org/75ty/
13:47:59 <narendra> mether, thanks
13:48:02 <mether> we build a RPM package using what is called a spec file
13:48:18 <mether> it is a simple text file
13:48:38 <mether> cd ~/rpmbuild/SPECS
13:48:54 <yevlempy> meejan_, after untaring it will we get "hello-2.5  hello-2.5.tar.gz  libguestfs-1.0.75  libguestfs-1.0.75.tar.gz"
13:48:54 <mether> you can either run rpmdev-newspec hello  or even simple vi hello.spec
13:49:13 <yevlempy> sorry mether  after untaring it will we get "hello-2.5  hello-2.5.tar.gz  libguestfs-1.0.75  libguestfs-1.0.75.tar.gz"
13:49:48 <mether> yevlempy, you have older tarballs in the same space.  hello-2.5 is the directory that contains the files from the archive hello-2.5.tar.gz., Rest are irrelevant
13:50:10 <mether> everyone ran vi hello.spec?
13:50:14 <yevlempy> ok
13:50:34 <mether> cd ~/rpmbuild/SPECS and vi hello.spec
13:50:42 <nmudgal> mether: done !
13:50:48 <meejan_> done
13:50:53 <praveenkumar> mether: yeah but when we run using vi hello.spec only a clean file open nothing there.
13:51:05 <gotunandan> yea
13:51:08 <mether> praveenkumar, did you have fedora-packager installed?
13:51:20 <nmudgal> praveenkumar: try rpmdev-newspec hello
13:51:49 <mether> if vi  hello.spec doesnt show you a spec file what nmudgal suggests should work
13:51:50 <praveenkumar> mether: yeah second one right for me.
13:51:54 <mether> alright
13:51:57 <mether> so lets go with that
13:52:01 * franciscod notes
13:52:13 <mether> this is a empty spec file for us to fill in the details
13:52:29 <mether> there are multiple sections in the spec file as you can see for yourself
13:52:34 <nmudgal> mether: yes !
13:52:42 <mether> Name to description is what is called the RPM meta data section
13:53:08 <mether> then prep build install clean files and changelog
13:53:14 <mether> lets fill in the details one by one
13:53:26 <praveenkumar> mether: ok
13:53:26 <mether> Name:  is the name of the software we are trying to package
13:53:29 <mether> what is that?
13:53:42 <morpheuss> hello
13:53:46 <mether> right
13:53:46 <rtnpro> mether, !
13:53:50 <mether> so just fill in
13:53:52 <nmudgal> mether: i.e. hello
13:53:57 <mether> Name : hello
13:54:00 <mether> rtnpro, shoot
13:54:14 <rtnpro> mether, what does the % sign mean in .spec file, comment?
13:54:25 <mether> rtnpro, we will get to that later
13:54:30 <rtnpro> mether, ok
13:54:52 <mether> basically it indicates the section or the macro name
13:55:09 <mether> after you fill in the name
13:55:13 <franciscod> abhijain: logs -> http://meetbot.fedoraproject.org/fedora-india/2010-04-16/rpm_packaging_workshop.2010-04-16-13.35.log.txt
13:55:19 <nmudgal> mether: what ? %sign ?
13:55:19 <mether> next is Version
13:55:19 <salvachn> mether, caught up now.
13:55:33 <mether> nmudgal, %description for example
13:55:52 <mether> Version:  is just the version number of the archive
13:55:56 <mether> in our case 2.5
13:56:09 <mether> Release should be pre-filled in
13:56:14 <mether> you can leave it as it is
13:56:21 <praveenkumar> mether: ok
13:56:22 <nmudgal> mether: ok
13:56:29 <mether> Summary:  is a short description of our software
13:56:32 <gotunandan> ok
13:56:36 <nmudgal> ok
13:56:44 <praveenkumar> ok
13:56:54 <bamachrn> ok
13:57:00 <mether> GNU hello program can be the Summary
13:57:09 <salvachn> mether, !
13:57:15 <mether> salvachn, shoot
13:57:34 <salvachn> mether, we can copy the summary from README for almost all source packages, right?
13:57:49 <mether> yes or just write down your own
13:58:01 * nmudgal raise hand
13:58:09 <mether> for aesthetic reasons the first letter of the summary should be capitalized
13:58:13 <mether> nmudgal, ask
13:58:18 <salvachn> mether, I once tried creating a rpm with just images but the spec went awry.
13:58:29 <gotunandan> salvachn, that would probably be the description rather than the summary ?
13:58:37 <nmudgal> what's it means in release %{?dist}
13:58:50 <mether> salvachn, lets deal with this example and if you have doubts about other spec files you can ask later
13:58:59 <salvachn> mether, ok :-)
13:59:21 <mether> nmudgal, I will get to that in the end but the default value is good for us now.
13:59:30 <nmudgal> mether: okay
13:59:34 <mether> just leave it as it is
13:59:38 <praveenkumar> mether:ok
13:59:39 <mether> and I will explain it
13:59:46 <mether> Group:
13:59:57 <mether> is RPM grouping
14:00:22 <salvachn> mether, !
14:00:25 <mether> since distribution repositories tends to be filled with thousands of programs, grouping them is one way of managing them
14:00:27 <mether> salvachn, ask
14:00:30 <salvachn> mether, as in yum -v grouplist ?
14:00:39 <mether> I am coming to that
14:00:43 <franciscod> salvachn: "yum search frogs"
14:00:56 <mether> In the past,  we have used Groups: tag to define the different groups
14:01:01 <franciscod> for the pictures example, have a look later
14:01:17 <mether> in Fedora,  we have switched to use comps which is a xml file that defines the different groups and yum uses that instead
14:01:41 <mether> The reason why we define it externally is because you can edit comps to redefine the groups without having to rebuild the package
14:01:48 <abhijain> hello
14:01:57 <nmudgal> mether: for installing like via groupinstall ?
14:02:08 <franciscod> logs for late comers -> http://meetbot.fedoraproject.org/fedora-india/2010-04-16/rpm_packaging_workshop.2010-04-16-13.35.log.txt
14:02:09 <mether> nmudgal, correct. that uses comps
14:02:19 * hakmn thanks franciscod
14:02:41 <praveenkumar> mether: ok
14:02:50 <mether> so in Fedora and most RPM distributions,  the group tag is deprecated and in new versions can be omitted completely even but lets define one since it does not hurt anything
14:03:09 <nmudgal> mether , !
14:03:14 <mether> RPM valid groups are listed at /usr/share/doc/rpm-<version>/GROUPS
14:03:30 <mether> nmudgal, ask
14:03:36 <nmudgal> mether: what replaced group tag then ?
14:04:14 <mether> nmudgal, comps.xml  -  refer to http://fedoraproject.org/wiki/How_to_use_and_edit_comps.xml_for_package_groups
14:04:29 <mether> lets pick a group
14:04:36 <nmudgal> mether: ok
14:04:49 <mether> since this is a text or command line application
14:04:57 <mether> the appropriate group is Applications/Text
14:05:05 <mether> so Group: Applications/Text
14:05:07 <skbohra> ?
14:05:13 <mether> skbohra, shoot
14:05:14 <morpheuss> Applications/System ?
14:05:16 <praveenkumar> mether: ok
14:05:21 <skbohra> mether: https://bugzilla.redhat.com/show_bug.cgi?id=582931 I got review
14:05:25 <morpheuss> mether: ok
14:05:43 <skbohra> mether: few things are not clear :)
14:05:48 <mether> skbohra, middle of a meeting.  I have seen the review.  If you have doubts ask later
14:06:07 <mether> morpheuss, applications/system is usually used for core system utilities
14:06:09 <skbohra> mether: ok
14:06:14 <mether> our hello program is not one
14:06:18 <morpheuss> mether: ok
14:06:26 <mether> so Applications/Text is more suitable
14:06:28 <gotunandan> Applications/File
14:06:41 <mether> but like I said we dont really use the group value
14:06:42 <gotunandan> right /Text too
14:06:43 <mether> in any place
14:06:48 <mether> so it is not very relevant
14:06:51 <mether> just pick one
14:07:00 <mether> License is our next tag
14:07:18 <mether> open a different terminal or tab
14:07:29 <praveenkumar> mether: ok
14:07:35 <mether> and cd ~/rpmbuild/SOURCES/hello-2.5
14:07:37 <nmudgal> mether: ok
14:07:58 <rtnpro> ok
14:08:00 <mether> The usual standard is a file called COPYING
14:08:13 <praveenkumar> mether: yeah
14:08:18 <bamachrn> ok
14:08:20 <mether> a quick look confirms that is GPLv3 license
14:08:43 <mether> but to really confirm you will have to read the source header
14:08:54 <mether> there is a sub directory called src
14:08:59 <mether> go into there
14:09:06 <yevlempy> mether, i could not get this "The usual standard is a file called COPYING"
14:09:12 <mether> less hello.c
14:09:22 <praveenkumar> ls
14:09:29 <mether> yevlempy, you should see a file called COPYING that defines the license
14:09:30 <praveenkumar> sorry
14:09:31 <nmudgal> yevlempy: file with the name COPYING should be there
14:09:45 <yevlempy> ok
14:09:48 <mether> as you can see is less hello.c
14:09:54 <mether> there is a copyright notice
14:09:57 <praveenkumar> mether: yeah
14:10:05 <mether> FSF has written this program
14:10:05 <nmudgal> yes
14:10:26 <mether> This program is free software: you can redistribute it and/or modify
14:10:27 <mether> it under the terms of the GNU General Public License as published by
14:10:27 <mether> the Free Software Foundation, either version 3 of the License, or
14:10:27 <mether> (at your option) any later version.
14:10:42 <mether> So it is not simply GPLv3
14:10:42 <nmudgal> mether: yes
14:10:47 <mether> but GPLv3 or later license
14:11:24 <mether> we have a exhaustive list of licenses and their tags in http://fedoraproject.org/wiki/Licensing
14:11:33 <mether> In our case the tag for GPLv3 or later
14:11:38 <mether> is GPLv3+
14:11:46 <nmudgal> mether: yes
14:11:50 <praveenkumar> mether: yes
14:12:01 <mether> so fill in that
14:12:13 <nmudgal> done !
14:12:16 <praveenkumar> mether: done
14:12:26 <mether> Note that Fedora only allows free and open source applications and we treat licenses very carefully
14:12:57 <mether> alright
14:12:59 <mether> lets move on
14:13:12 <mether> next is Source:
14:13:17 <shakti> sorry i am late...
14:13:26 <mether> this is simply the location of the tarball
14:13:30 <mether> where did you download it from
14:13:40 <praveenkumar> mether: its URL before source
14:13:41 <yevlempy> mether, URL?
14:13:41 <mether> In our case
14:13:43 <mether> http://ftp.gnu.org/gnu/hello/hello-2.5.tar.gz
14:13:46 <franciscod> logs for late comers -> http://meetbot.fedoraproject.org/fedora-india/2010-04-16/rpm_packaging_workshop.2010-04-16-13.35.log.txt
14:13:46 <morpheuss> http://ftp.gnu.org/gnu/hello/hello-2.6.tar.gz
14:13:52 <franciscod> shakti: ^
14:13:54 <shakti> can i start now??
14:14:04 <gotunandan> mether, difference between source and URL ?
14:14:06 <mether> URL:  http://ftp.gnu.org/gnu/hello
14:14:06 <nmudgal_> URL is  http://ftp.gnu.org/gnu/hello/hello-2.6.tar.gz ?
14:14:18 <mether> Source is the complete path
14:14:23 <salvachn> franciscod, maybe we can set the topic for the channel as the log url until this session ends?
14:14:44 * franciscod goes to tiny the url
14:14:49 <mether> URL is the home page of the project
14:14:57 <mether> Source is the source archive location
14:14:59 <nmudgal_> mether: ok
14:15:03 <mether> got it?
14:15:11 <praveenkumar> mether: yeah
14:15:12 <gotunandan> yes
14:15:15 <mether> good
14:15:16 <mether> lets move on
14:15:24 <mether> %description
14:15:27 <nmudgal_> yes
14:15:27 <mether> is our next section
14:15:44 <mether> Basically a extended verison of Summary: that we filled up earlier
14:15:57 <mether> the README file in the source archive usually provides that
14:16:10 <mether> I have filled up
14:16:11 <mether> The "Hello World" program, done with all bells and whistles of a proper FOSS
14:16:11 <mether> project, including configuration, build, internationalization, helpfiles, etc.
14:16:20 <nmudgal_> ok !
14:16:30 <mether> It is just a plain simple description of what the software is
14:16:45 <mether> alright
14:16:52 <mether> whats next?
14:16:58 <morpheuss> % prep
14:17:08 <mether> right
14:17:10 <gotunandan> mether , do we have to replace the "%description" with the actually description or place it below that
14:17:18 <mether> gotunandan, below
14:17:26 <gotunandan> ok, done
14:17:39 <praveenkumar> done
14:17:47 <nmudgal_> ok
14:17:47 <morpheuss> each tag/macro should be in seperate line right ?
14:17:48 <mether> so you all must be familiar with how we build a binary from a source
14:17:54 <mether> yes
14:18:11 <mether> usually the first is to untar the tarball
14:18:12 <mether> right
14:18:17 <mether> tar xvf foo.tar.gz
14:18:23 <mether> or tar.bz2 or whatever
14:18:40 <mether> %setup is a nice and simple RPM macro
14:18:43 <mether> or a shortcut
14:18:46 <mether> to simplify that step
14:19:04 <mether> it takes care of extracting the source
14:19:08 <nmudgal_> mether: that step ?
14:19:10 <mether> whether it is a gzipped tarball
14:19:17 <mether> or a bzip2 tarball
14:19:28 <mether> or many other formats like zip and LZMA
14:19:30 <mether> %setup
14:19:33 <mether> understands them all
14:19:40 <mether> and knows how to extract them
14:19:42 <mether> quite handy
14:19:45 <nmudgal_> ok
14:20:04 <mether> since %setup is smart and knows how to exact the tarball
14:20:09 <mether> we can just leave it as it is
14:20:19 <mether> you might notice the -q parameter
14:20:29 <mether> that is to keep it quiet
14:20:39 <mether> alright
14:20:40 <mether> lets move on
14:20:42 <morpheuss> ok
14:20:44 <praveenkumar> mether: ok
14:20:51 <salvachn> mether, so not mandatory to place the extracting command under %prep?
14:20:52 * nmudgal_ raise hand
14:20:52 <mether> next step is %build
14:21:07 <mether> salvachn, no %setup is what does the extraction.
14:21:22 <salvachn> mether, so %prep can be empty?
14:21:27 <mether> salvachn, you can remove %setup and run tar xvf yourself but that is unnecessary
14:21:38 <salvachn> mether, okay
14:21:44 <mether> %prep section contains the macro called %setup
14:21:45 <nmudgal_> mether: what you mean by to keep it quiet ?
14:21:51 <mether> setup is not a separate section
14:21:55 * franciscod notes that it is always advised to use whatever macros are available
14:22:05 <salvachn> nmudgal_, no verbose output on terminal
14:22:09 <franciscod> rather than commands themselves
14:22:16 <nmudgal_> salvachn: ok
14:22:24 <mether> alright
14:22:26 <salvachn> franciscod, point taken. will remember.
14:22:28 <mether> everyone clear on %prep
14:22:38 <hakmn> yup
14:22:40 <mether> lets move to %build section
14:22:43 <nmudgal_> yup
14:22:54 <mether> after extracting the tarball
14:22:56 <mether> you usually run
14:23:00 <mether> configure command
14:23:03 <mether> ./configure
14:23:04 <mether> right
14:23:07 <salvachn> yes
14:23:10 <mether> instead of that command
14:23:12 <praveenkumar> yes
14:23:12 <nmudgal_> right !
14:23:14 <mether> we have %configure macro
14:23:30 <mether> again the macro is a shortcut
14:23:36 <mether> and takes care of a number of details for us
14:24:15 * franciscod rpm --eval %configure
14:24:16 <nmudgal_> got it !
14:24:22 <mether> where to install the binary
14:24:39 <mether> where to place the locale or translation files
14:24:42 <mether> all that is taken care of
14:24:46 <mether> by %configure macro
14:24:47 <salvachn> okay.
14:24:58 <yevlempy> ok
14:25:07 <praveenkumar> ok
14:25:08 <hakmn> ohk
14:25:24 <mether> rpm --eval shows you exactly
14:25:28 <mether> what each macro does
14:25:45 <mether> and it is useful to understand what they do behind the scenes
14:25:56 <mether> but in our case, the macro does the right thing
14:26:03 <mether> and we need not worry about it
14:26:10 <praveenkumar> ok
14:26:11 <mether> next is make
14:26:22 <mether> instead of just calling make
14:26:25 <mether> we call
14:26:26 <mether> make %{?_smp_mflags}
14:27:08 <praveenkumar> mether: what is %{?_smp_mflags} ?
14:27:09 <mether> SMP stands for Symmetric multiprocessing
14:27:23 <mether> just a fancy way of saying use whatever CPU's are available
14:27:29 <mether> so if there is more than one
14:27:37 <nmudgal_> & what is mflags ?
14:27:41 <mether> use them all to build the binary
14:27:47 <mether> i just explained that
14:28:18 <nmudgal_> ok
14:28:24 <mether> Modern systems come with more than CPU
14:28:33 <mether> and using them all is more effective
14:28:37 <mether> than using a single one
14:28:44 <mether> make only uses one by default
14:28:47 <yevlempy> hmm
14:28:54 <mether> the macro makes sure we use whatever is available on the system
14:29:12 <mether> next comes the %install section
14:29:13 <nmudgal_> ohk
14:29:23 <praveenkumar> ok
14:29:24 <franciscod> https://fedoraproject.org/wiki/Packaging/Guidelines#Parallel_make <- look up later
14:29:38 <mether> we have run make
14:29:43 <mether> next step is make install
14:29:48 <mether> but there is a bit of twist
14:30:17 <mether> we only want the software to be installed when we run rpm or yum
14:30:25 <mether> at this point we are simply trying to build a package
14:30:36 <mether> if you look under ~/rpmbuild
14:31:03 <mether> you will see a BUILDROOT directory
14:31:17 <praveenkumar> got it
14:31:31 <mether> we are going to tell make install
14:31:32 <nmudgal_> mether: that is empty
14:31:36 <mether> to install to that directory
14:31:41 <mether> when the package is being built
14:31:55 <mether> and we specify that using make install DESTDIR=$RPM_BUILD_ROOT
14:32:10 <mether> DESTDIR meaning destination directory
14:32:23 <nmudgal_> so everything that gets installed via rpm or yum is installed int BUILD directory ?
14:32:25 <rtnpro> ok
14:32:26 <mether> and build root is a environmental variable
14:32:37 <mether> nmudgal_, when we build it, yes
14:32:43 <mether> it is a temporary place
14:32:57 <mether> you might also notice
14:32:58 <mether> rm -rf $RPM_BUILD_ROOT
14:32:59 <nmudgal_> mether: ok
14:33:15 <praveenkumar> ok
14:33:27 <mether> we dont want to leftovers from previous builds interrupting the current one
14:33:30 <mether> so we clean that
14:33:34 <mether> and then install into that
14:33:51 <nmudgal_> mether: ok
14:33:59 <mether> make sense?
14:34:08 <gotunandan> mether, yup it does
14:34:13 <nmudgal_> yes
14:34:15 <mether> %install
14:34:15 <mether> rm -rf $RPM_BUILD_ROOT
14:34:15 <mether> make install DESTDIR=$RPM_BUILD_ROOT
14:34:17 <salvachn> okay. all is clear
14:34:26 <mether> this is how your %install section looks like
14:34:27 <mether> correct
14:34:27 <yevlempy> surely it does
14:34:29 <bamachrn> ok
14:34:39 <praveenkumar> ok
14:34:41 <mether> whats the next section
14:34:42 <nmudgal_> ok
14:34:50 <yevlempy> %clean
14:34:52 <salvachn> %clean
14:34:53 <nmudgal_> %clean
14:34:57 <praveenkumar> %clean
14:35:01 <rtnpro> post
14:35:04 <mether> right
14:35:05 <mether> clean
14:35:11 <mether> we are simply cleaning the build root again
14:35:26 <rtnpro> ok
14:35:28 <mether> we really want the build root to be empty before and after the build
14:35:37 <mether> so that we are building in a pristine place
14:35:52 <mether> next is %files
14:36:02 <praveenkumar> ok
14:36:18 <mether> it is simply a list of all the files
14:36:22 <mether> that should be part of the package
14:36:31 <mether> we will come to that later
14:36:39 <mether> %changelog
14:36:45 <mether> is the next section
14:36:52 <praveenkumar> yes
14:37:04 <mether> we are going to describe what we have changed today
14:37:09 <mether> what is the date
14:37:10 <nmudgal_> yes
14:37:26 <mether> what is today's date
14:37:38 <yevlempy> 16th april
14:37:38 <praveenkumar> mether: apr 16,2010
14:37:39 <hakmn> 16 April '10
14:37:41 <nmudgal_> mether: 16-04-2010
14:37:43 <mether> yep
14:37:47 <morpheuss> mether: Fri 16 Apr 2010
14:37:50 <mether> so the format we need to fill is
14:38:37 <mether> * Fri Apr 16 2010 Full Name <mailme@example.com>
14:38:44 <nmudgal_> mether: ok
14:38:48 <mether> followed by the version number
14:39:02 <mether> - 2.5-1
14:39:06 <mether> so it looks like
14:39:34 <mether> % Fri Apr 16 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 2.5-1
14:39:35 <praveenkumar> ok
14:39:38 <mether> 2.5 is the version
14:39:43 <mether> 1 is the release number
14:39:52 <bamachrn> mether, ?
14:39:56 <mether> bamachrn, yes
14:40:02 <hakmn> mether` why % here ?
14:40:16 <mether> % is how we note that section
14:40:23 <mether> sorry
14:40:25 <mether> not percentage
14:40:27 <morpheuss> * ?
14:40:28 <mether> *
14:40:43 <mether> Simply a standard way of writing a changelog
14:40:43 <hakmn> mether` ohk
14:40:50 <nmudgal_> mether: okay
14:40:52 <bamachrn> mether, what will be mailme?
14:40:53 <gotunandan> mether, I guess every changelog entry should start with a '*' right ?
14:41:07 <mether> bamachrn, thats just a example email address
14:41:08 <bamachrn> mether, ok
14:41:13 <mether> gotunandan, correct
14:41:26 <bamachrn> mether, ok got it
14:41:39 <hakmn> mether` !
14:41:44 <mether> hakmn, yes
14:41:57 <hakmn> mether` why is '-' between .org> & version
14:42:20 <mether> again just a way of writing it.  it is not strictly that format
14:42:22 <franciscod> its a standard changelog format
14:42:28 <hakmn> ohk
14:42:35 <mether> we are merely following a standard convention
14:42:43 <praveenkumar> ok
14:42:54 <mether> the next line
14:42:58 <mether> we describe
14:43:03 <mether> what we have actually done in this date
14:43:06 <mether> something like
14:43:19 <mether> - Initial Build
14:43:21 <franciscod> https://fedoraproject.org/wiki/Packaging:Guidelines#Changelogs <- refer later
14:43:32 <mether> done?
14:43:38 <hakmn> yp
14:43:42 <nmudgal_> done
14:43:45 <mether> now save the spec file
14:43:48 <mether> and exit
14:43:49 <salvachn> done
14:43:49 <praveenkumar> done
14:43:57 <nmudgal_> done
14:44:11 <hakmn> mether` !
14:44:16 <mether> hakmn, yes
14:44:28 <hakmn> explain  BuildRoot
14:44:46 <rtnpro> done
14:45:03 <mether> BuildRoot is a temporary directory in which a package is being built
14:45:03 <bamachrn> done
14:45:25 <mether> In the spec file a default value
14:45:26 <mether> is there
14:45:40 <hakmn> & how to change $RPM_BUILD_ROOT
14:45:45 <mether> Recent versions of RPM actually use
14:45:59 <nmudgal_> mether so it does define it ? BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
14:46:02 <mether> rpmbuild/BUILDROOT by default
14:46:13 <mether> and completely ignores what is defined in the spec file
14:46:22 <mether> so you can delete that line entirely
14:46:27 <mether> and it wont make any difference
14:46:46 <hakmn> mether` but where to view this env var ?
14:46:49 <mether> nmudgal_, thats the default value, yes
14:47:06 <mether> rpmbuild will set that while it is building a package
14:47:20 <hakmn> ohk, gotta
14:47:33 <mether> rpmbuild is the command
14:47:42 <mether> we will be using to build a RPM package from a spec file
14:47:50 <mether> there are two different rpms of RPM's
14:47:53 <mether> Source and Binary
14:48:03 <mether> Source RPM's end with .srpm extension
14:48:11 <mether> Binary RPM's end with .rpm extension
14:48:24 <mether> Source RPM is basically the upstream source archive + your spec file
14:48:37 <mether> In some cases, it might also have patches in it
14:48:38 <hiemanshu> mether: isnt source .src.rpm now
14:49:22 <mether> yep
14:49:34 <mether> it goes into the directory SRPM still
14:49:53 <hakmn> mether` upstream' source archive ?
14:49:53 <mether> rpmbuild can build both these
14:49:54 <mether> packages
14:50:12 <mether> Upstream = place where you downloaded the source from
14:50:14 <mether> in our case
14:50:27 <mether> http://www.gnu.org/software/hello/
14:50:32 <nmudgal_> mether: ok got it !
14:50:44 <hakmn> oh
14:50:50 <mether> is that clear?
14:50:55 <salvachn> okay.
14:50:55 <praveenkumar> yeah
14:50:57 <nmudgal_> mether: yes
14:50:58 <hakmn> yup,
14:51:01 <hakmn> mether` !
14:51:06 <mether> hakmn, ask
14:51:17 <hakmn> what to do with BuildRequires & Requires ?
14:51:24 <mether> I will come to that
14:51:31 <mether> lets actually try to build the package
14:51:35 <mether> using rpmbuild
14:51:35 <hakmn> ok
14:51:44 <nmudgal_> ok
14:51:46 <mether> dont be surprised. it will not work yet
14:51:56 <nmudgal_> :)
14:52:16 <mether> you run the command
14:52:21 <mether> rpmbuild -ba hello.spec
14:52:26 <mether> -ba = build all
14:52:36 <mether> meaning build both the binary and source
14:52:50 <mether> run that
14:53:01 <yevlempy> mether, error: line 12: Empty tag: BuildRequires:
14:53:04 <morpheuss> shall i comment out build requers ?
14:53:08 <mether> yep
14:53:11 <praveenkumar> mether: it show error line 12: Empty tag: BuildRequires:
14:53:12 <morpheuss> requires*
14:53:26 <mether> add a # in front of both BuildRequires and Requires
14:53:27 <gotunandan> yes
14:53:38 <mether> we are merely commenting it out
14:53:43 <mether> telling rpmbuild
14:53:45 <mether> to ignore it
14:53:51 <mether> by adding a # in front of it
14:53:54 <praveenkumar> mether: and require too?
14:53:54 <mether> done?
14:53:57 <mether> yes
14:53:58 <mether> both
14:53:59 <salvachn> done
14:54:02 <praveenkumar> ok done
14:54:04 <nmudgal_> ok
14:54:04 <balachandarkm> mether: oops I mes up my time.Is there anyway to join now? sorry.
14:54:07 <mether> try running rpmbuild again
14:54:26 <mether> balachandarkm, see /topic for the logs
14:54:28 <yevlempy> done
14:54:37 <mether> what do we get this time
14:54:53 <hakmn> error: %changelog entries must start with *
14:54:55 <nmudgal_> mether: i get error: File /root/rpmbuild/SOURCES/hello-2.6.tar.gz: No such file or directory when run command
14:55:04 <yevlempy> no errors
14:55:11 <mether> nmudgal_, what version did you download
14:55:14 <gotunandan> mether: error: no description in %changelog
14:55:15 <mether> i am using 2.5
14:55:21 <rtnpro> done :)
14:55:29 * yevlempy is also done
14:55:33 <mether> gotunandan, show me your spec file
14:55:36 <nmudgal_> it is 2.1.1 mether
14:55:40 <morpheuss> gotunandan: 2.6
14:55:48 <mether> 2.5 is what i am using
14:55:52 <mether> 2.6 should also work fine
14:55:57 <mether> but what you have downloaded
14:55:59 <mether> should match
14:56:03 <mether> what you specify in the spec file
14:56:10 <mether> stick to one version
14:56:10 <salvachn> mether, I get "error: Installed (but unpackaged) file(s) found"
14:56:12 <morpheuss> mether:http://ftp.gnu.org/gnu/hello/hello-2.6.tar.gz
14:56:20 <morpheuss> we gave this link earlier
14:56:25 <hakmn> mether` !
14:56:27 <mether> morpheuss, you did, yes
14:56:31 <mether> hakmn, ask
14:56:32 <hakmn> error: bad date in %changelog: Fri 16 Apr 2010
14:56:39 <balachandarkm> mether: yeah..
14:56:41 <salvachn> Apr 16
14:56:43 <salvachn> not 16 Apr
14:56:45 <mether> hakmn, you forgot the * in front
14:56:57 <mether> ?
14:57:09 <franciscod> mether: rpmlint on spec? later?
14:57:14 <salvachn> mether, 16 Apr spewed an error for me.
14:57:19 <mether> franciscod, one thing at time. patience
14:57:30 <gotunandan> mether. here http://pastie.org/923260
14:57:41 <franciscod> * Fri Jun 23 2006 Jesse Keating <jkeating@redhat.com> - 0.6-4 <- example
14:57:44 <mether> salvachn, yes the order is important
14:57:55 <BANSAL> mether ! error: File ~/rpmbuild/SOURCES/hello-2.5.tar.gz: No such file or directory
14:58:07 <salvachn> mether, I get this one: "error: Installed (but unpackaged) file(s) found"
14:58:15 <mether> salvachn, thats the right error
14:58:15 <praveenkumar> done
14:58:23 <salvachn> mether, :-)
14:58:29 <mether> BANSAL, you need to download the source
14:58:49 <mether> and move it into rpmbuild/SOURCES
14:58:59 <gotunandan> mether, I am using hello-2.5
14:58:59 <mether> BANSAL, you seemed to have missed that step
14:59:06 <mether> gotunandan, you forgot to describe
14:59:09 <mether> what you have done
14:59:10 <BANSAL> mether i have done that ...
14:59:10 <yevlempy> i am pasting my hello.spec file for reference "http://fpaste.org/tGyV/" i got things dome right
14:59:11 <mether> on that date
14:59:14 <nmudgal_> erro/error
14:59:14 <nmudgal_> mether: now i m using 2.5 but still same erro
14:59:19 <yevlempy> s/dome/done
14:59:24 <BANSAL> i have hello2.5 directory there ...
14:59:27 <mether> one at a time folks
14:59:44 <mether> gotunandan, let me answer you first
14:59:47 <franciscod> BANSAL: you have the tar in ther too right?
14:59:50 <mether> you need to add a description
14:59:56 <mether> - Initial build
15:00:03 <mether> after the date
15:00:07 <mether> next line
15:00:18 <BANSAL> franciscod: under SOURCE ?
15:00:20 <gotunandan> mether : yes... right, that was daft :)
15:00:30 <mether> gotunandan, do that and run rpmbuild again
15:00:36 <franciscod> BANSAL: yes, you need to have the tar in the SOURCE directory too,
15:00:42 <mether> if you get the same error as salvachn we are good for the next step
15:00:46 <franciscod> not just the untarred directory
15:00:50 <BANSAL> franciscod: ohhh.. ok..
15:01:00 <franciscod> nmudgal_: same as BANSAL
15:01:05 <franciscod> ?
15:01:19 <nmudgal_> franciscod: no i have tar extracted in SOURCES/
15:01:20 <mether> rpmbuild says
15:01:31 <franciscod> nmudgal_: do you have the tar too?
15:01:42 <mether> it cannot access ~/rpmbuild/SOURCES/hello-2.5.tar.gz
15:01:47 <nmudgal_> franciscod: no !
15:01:50 <mether> run ll against that location
15:01:53 <gotunandan> mether, yes got it : RPM build errors:     Installed (but unpackaged) file(s) found:
15:01:56 <mether> you need the tarball
15:01:59 <franciscod> rpmbuild does not use the untarred direcrtory, it has to have the tar too
15:02:07 <mether> gotunandan, correct. we have the right error :-)
15:02:48 <mether> BANSAL, and nmudgal_  the unextracted tarball needs to be in ~/rpmbuild/SOURCES
15:02:58 <mether> extracted directory is not enough
15:03:03 <mether> we are building from the tarball
15:03:06 <nmudgal_> franciscod: but it stuck on same error i have now tar too in the dir
15:03:06 <mether> not a directory
15:03:13 <BANSAL> mether done !!
15:03:23 <mether> BANSAL, what error do you get now?
15:03:47 <BANSAL> mether nothing !! i have done that ..
15:03:58 <mether> BANSAL, run rpmbuild -ba on the spec file
15:04:01 <franciscod> nmudgal_: ls SOURCES/ | fpaste
15:04:15 <nmudgal_> mether: why this if i am doing with v2.5 ?  /root/rpmbuild/SOURCES/hello-2.6.tar.gz: No such file or directory
15:04:24 <praveenkumar> i build that without error after that no package in SRPMS and RPMS ? am i done some wrong step?
15:04:26 <mether> nmudgal_, show me your spec file
15:04:41 <mether> praveenkumar, we are not done yet. there is still some things to be done
15:04:52 <mether> if you are running rpmbuild -ba hello.spec
15:04:56 <mether> do you get any output
15:04:56 <praveenkumar> mether: ok
15:04:57 <mether> at all
15:05:14 <BANSAL> mether: i have run the command ... no errors ..
15:05:24 <mether> BANSAL, show me your spec file
15:05:29 <nmudgal_> mether: http://fpaste.org/2c8M/
15:05:57 <praveenkumar> mether: i also run command and no error occur
15:05:59 <mether> nmudgal_, i spotted your mistake
15:06:09 <mether> praveenkumar, show your spec as well
15:06:12 <nmudgal_> mether: what ?
15:06:15 <mether> nmudgal_, see if you can
15:06:17 <mether> where is 2.6
15:06:20 <mether> in that spec file
15:06:34 <nmudgal_> mether: no 2.6
15:06:35 <mether> why is rpmbuild looking for 2.6
15:06:39 <BANSAL> mether http://www.fpaste.org/TW5Y/
15:06:43 <mether> there is certainly one instance of 2.6
15:06:49 <mether> nmudgal_, search again
15:07:16 * morpheuss nods
15:07:52 <franciscod> BANSAL: rpm -ba right?
15:07:54 <nmudgal_> mether: yes source url !
15:07:55 <franciscod> not bs?
15:08:04 <mether> nmudgal_, yep. fix it
15:08:11 <mether> franciscod, ba correct
15:08:22 <mether> BANSAL, are you running rpmbuild -ba hello.spec
15:08:28 <mether> you too praveenkumar
15:08:30 <franciscod> what does it say when you run  that?
15:08:42 <balachandarkm> mether: after running rpmdev-setuptree I don't get the dir structure.
15:08:47 <BANSAL> mether: i have run it already !!
15:08:58 <franciscod> BANSAL: and?
15:09:04 <balachandarkm> mether: is it compulsary to run in home dir
15:09:08 <nmudgal_> mether: okay but with no error
15:09:13 <praveenkumar> mether: yeah i run rpmbuild -ba hello.spec
15:09:25 <franciscod> balachandarkm: ls ~/ | fpaste
15:09:37 <praveenkumar> http://www.fpaste.org/utvE/
15:09:54 <BANSAL> franciscod: it's not showing any error .. just executed ....
15:10:16 <nmudgal_> franciscod: yes no error & execution !
15:10:18 <BANSAL> franciscod: i send you the result ~!!
15:10:23 <balachandarkm> franciscod : fpaste command not found.
15:10:46 <morpheuss> balachandarkm: yum install fpaste
15:10:49 <franciscod> balachandarkm: er.. please paste the file contents to fpaste.org
15:10:51 <balachandarkm> fransiscod: do I need to install any other than fedora-packager
15:11:03 <mether> balachandarkm, what version of fedora?
15:11:12 <balachandarkm> mether: fedora 11
15:11:15 <franciscod> BANSAL: tell me the output of the command, whatever it says
15:11:19 <mether> yum install fpaste then
15:11:24 <mether> fedora 12 installs it by default
15:11:34 <franciscod> nmudgal_: you too,
15:11:35 <krishnababu> i am having the same file what bansal has but still i am getting the error (what mether is saying that "we supposed to get that error")
15:11:38 <BANSAL> franciscod: http://www.fpaste.org/2OW7/
15:11:39 <nmudgal_> mether: i got no error like others do ! & clear execution !
15:12:00 <mether> nmudgal_, please show us the output
15:12:11 <franciscod> BANSAL: rpm -q gcc | fpaste
15:12:34 <franciscod> mether: he doenst have gcc installed looks like :)
15:12:45 <nmudgal_> mether: http://fpaste.org/36id/
15:13:03 <praveenkumar> mether: after build we have show the output also if we got no error?
15:13:08 <mether> nmudgal_, you do have that error
15:13:22 <mether> nmudgal_, scroll up a bit
15:13:24 <mether> and you will see
15:13:25 <mether> RPM build errors:
15:13:26 <mether> Installed (but unpackaged) file(s) found:
15:13:27 <franciscod> nmudgal_: line 448
15:13:29 <mether> see that?
15:13:39 <BANSAL> franciscod:you are right .. i don't have ...
15:13:46 <mether> BANSAL, do install it
15:13:49 <mether> quick way to do it
15:13:50 <mether> is
15:13:55 <BANSAL> mether: doing ..
15:13:58 <nmudgal_> mether: okay
15:13:59 <franciscod> BANSAL: yum groupinstall "Development Tools"
15:13:59 <mether> yum install @development-tools
15:14:01 <balachandarkm> methor: I got no error after executing rpmdev-setuptree
15:14:03 <nmudgal_> done !
15:14:09 <balachandarkm> mether: no dirs too
15:14:12 <hakmn> mether` !, just got after elec failed
15:14:22 <mether> hakmn, what
15:14:23 <franciscod> balachandarkm: you wont get an error,
15:14:30 <hakmn> error: no description in %changelog
15:14:40 <franciscod> ls ~/ | fpaste
15:14:40 <mether> hakmn, you too have missed the last line
15:14:46 <mether> - Initial build
15:14:55 <mether> that should be the very last line
15:15:08 <hakmn> mether` * Fri Apr 16 2010 Ayush Maheshwari <hakmn@fedoraproject.org> - 2.5-1
15:15:16 <mether> hakmn, add a line after that
15:15:20 <mether> - Initial build
15:15:23 <praveenkumar> mether: ok i also got same error "RPM build errors:  Installed (but unpackaged) file(s) found:" now what we do?
15:15:29 <hakmn> ok
15:15:40 <mether> praveenkumar, congratulations.  now wait :-)
15:15:48 <franciscod> hakmn: a change log is to tell people why this change was made, in this case, its a new rpm,
15:15:49 <praveenkumar> mether: ok
15:15:50 <mether> let everyone get the same error
15:15:55 <franciscod> so the description is necessary
15:16:00 <mether> and we can move to the next step
15:16:01 <balachandarkm> mether: ls ~/ | fpaste  What this command will do ??
15:16:07 <hakmn> yup success
15:16:12 <nmudgal_> mether: ok
15:16:13 <mether> hakmn, same error
15:16:14 <yevlempy> ok
15:16:22 <mether> same error for everyone at this point
15:16:29 <franciscod> balachandarkm: it will pste the contents of ls ~/ to fpaste.org so i can see it
15:16:32 <praveenkumar> yep
15:16:43 <mether> other than balachandarkm everyone is on the same step?
15:16:45 <nmudgal_> yes mether
15:16:53 <mether> salvachn,
15:17:02 <mether> gotunandan,
15:17:11 <gotunandan> mether, yup
15:17:16 <balachandarkm> fransiscod : is it compulsory to do it in home directory ?
15:17:16 <mether> alright good
15:17:28 <mether> balachandarkm,  preferable
15:17:29 <franciscod> balachandarkm: no , i dont recall that requirement
15:17:33 <mether> is there a problem with that
15:17:42 <mether> run it in any directory
15:17:53 <mether> it will just create a rpmbuild directory
15:17:57 <mether> where you run that command
15:18:10 <mether> balachandarkm, i will come to you later
15:18:13 <mether> lets move on
15:18:19 <mether> why are we getting that error
15:18:21 <mether> any ideas?
15:18:27 <mether> what does it mean
15:18:34 * franciscod hint : error description ;)
15:18:37 <nmudgal_> mether: because we just have spec file ?
15:18:40 <gotunandan> translations...
15:18:58 <hakmn> exactly as nmudgal_
15:19:02 <mether> nmudgal_,we only need a spec file to build the package
15:19:06 <mether> the error is
15:19:13 <mether> error: Installed (but unpackaged) file(s) found:
15:19:19 * franciscod hints again : error *description*
15:19:24 <mether> what rpmbuild is trying to tell you
15:19:25 <mether> is this
15:19:34 <mether> you didnt fill in the %files section yet
15:19:44 <nmudgal_> ohh
15:19:50 <gotunandan> ok
15:19:50 <praveenkumar> oh
15:19:52 <hakmn> :(
15:20:01 <nmudgal_> but which files ?
15:20:18 <mether> all the files that are part of the compilation
15:20:18 <morpheuss> doc readme copying etc.,
15:20:20 <gotunandan> all the files mentioned there i guess ?
15:20:25 <mether> rpmbuild is listing them all
15:20:34 <mether> /usr/bin/hello
15:20:34 <mether> /usr/share/info/dir
15:20:34 <mether> /usr/share/info/hello.info.gz
15:20:34 <mether> /usr/share/locale/bg/LC_MESSAGES/hello.mo
15:20:34 <mether> /usr/share/locale/ca/LC_MESSAGES/hello.mo
15:20:35 <mether> /usr/share/locale/da/LC_MESSAGES/hello.mo
15:20:36 <mether> /usr/share/locale/de/LC_MESSAGES/hello.mo
15:20:38 <mether> /usr/share/locale/el/LC_MESSAGES/hello.mo
15:20:42 <mether> /usr/share/locale/en@boldquot/LC_MESSAGES/hello.mo
15:20:44 <mether> /usr/share/locale/en@quot/LC_MESSAGES/hello.mo
15:20:46 <mether> /usr/share/locale/eo/LC_MESSAGES/hello.mo
15:20:48 <mether> /usr/share/locale/es/LC_MESSAGES/hello.mo
15:20:50 <mether> /usr/share/locale/et/LC_MESSAGES/hello.mo
15:20:52 <mether> /usr/share/locale/eu/LC_MESSAGES/hello.mo
15:20:54 <mether> /usr/share/locale/fa/LC_MESSAGES/hello.mo
15:20:56 <mether> /usr/share/locale/fi/LC_MESSAGES/hello.mo
15:20:58 <mether> /usr/share/locale/fr/LC_MESSAGES/hello.mo
15:21:00 <mether> /usr/share/locale/ga/LC_MESSAGES/hello.mo
15:21:02 <mether> /usr/share/locale/gl/LC_MESSAGES/hello.mo
15:21:04 <mether> /usr/share/locale/he/LC_MESSAGES/hello.mo
15:21:06 <mether> /usr/share/locale/hr/LC_MESSAGES/hello.mo
15:21:08 <mether> /usr/share/locale/hu/LC_MESSAGES/hello.mo
15:21:12 <mether> /usr/share/locale/id/LC_MESSAGES/hello.mo
15:21:14 <mether> /usr/share/locale/it/LC_MESSAGES/hello.mo
15:21:16 <mether> /usr/share/locale/ja/LC_MESSAGES/hello.mo
15:21:18 <mether> /usr/share/locale/ka/LC_MESSAGES/hello.mo
15:21:20 <mether> /usr/share/locale/ko/LC_MESSAGES/hello.mo
15:21:22 <mether> /usr/share/locale/lv/LC_MESSAGES/hello.mo
15:21:24 <mether> /usr/share/locale/ms/LC_MESSAGES/hello.mo
15:21:26 <mether> /usr/share/locale/nb/LC_MESSAGES/hello.mo
15:21:28 <mether> /usr/share/locale/nl/LC_MESSAGES/hello.mo
15:21:30 <mether> /usr/share/locale/nn/LC_MESSAGES/hello.mo
15:21:32 <mether> /usr/share/locale/pl/LC_MESSAGES/hello.mo
15:21:34 <mether> /usr/share/locale/pt/LC_MESSAGES/hello.mo
15:21:36 <mether> /usr/share/locale/pt_BR/LC_MESSAGES/hello.mo
15:21:37 <balachandarkm> mether : ok I ll follow the log files.
15:21:38 <mether> /usr/share/locale/rm/LC_MESSAGES/hello.mo
15:21:42 <mether> /usr/share/locale/ro/LC_MESSAGES/hello.mo
15:21:44 <mether> /usr/share/locale/ru/LC_MESSAGES/hello.mo
15:21:46 <mether> /usr/share/locale/sk/LC_MESSAGES/hello.mo
15:21:48 <mether> /usr/share/locale/sl/LC_MESSAGES/hello.mo
15:21:50 <mether> /usr/share/locale/sr/LC_MESSAGES/hello.mo
15:21:52 <mether> /usr/share/locale/sv/LC_MESSAGES/hello.mo
15:21:54 <mether> /usr/share/locale/th/LC_MESSAGES/hello.mo
15:21:56 <mether> /usr/share/locale/tr/LC_MESSAGES/hello.mo
15:21:58 <mether> /usr/share/locale/uk/LC_MESSAGES/hello.mo
15:22:00 <mether> /usr/share/locale/vi/LC_MESSAGES/hello.mo
15:22:02 <mether> /usr/share/locale/zh_C
15:22:04 <franciscod> mether: did you paste the entire error output??
15:22:04 <mether> Sorry for the long output
15:22:06 <mether> I should have used fpaste
15:22:08 <mether> here you go
15:22:10 <morpheuss> my bad, man pages
15:22:12 <mether> http://fpaste.org/k0Mb/
15:22:14 <mether> everyone seeing that?
15:22:16 <mether> balachandarkm, yes. please follow it from the start and we will get to the portion
15:22:18 <nmudgal_> mether: we are building it through tarball then it have all the files in that then why need it seperately ?
15:22:20 <mether> ok
15:22:34 <mether> nmudgal_, we are not necessarily going to include everything
15:22:42 <franciscod> nmudgal_: the files are lying in the buildroot directory, ready to be put into the rpm :)
15:23:03 <mether> %files section
15:23:10 <mether> has a few different important attributes
15:23:15 <mether> it specifies not just a list of files
15:23:20 <nmudgal_> franciscod: ok seen !
15:23:20 <mether> but also what permissions they have
15:23:31 <mether> and which files are documentation
15:23:37 <mether> etc
15:23:54 <mether> you see in http://fpaste.org/k0Mb/
15:24:04 <mether> a long list
15:24:09 <mether> lets break them one by one
15:24:20 <mether> whats the file line
15:24:24 <mether> first line
15:24:45 <mether> in the long list of files
15:24:49 <mether> what is the very first file
15:24:55 <hakmn> yes
15:25:03 <gotunandan> mether, the hello executable
15:25:05 <praveenkumar> binary of hello
15:25:08 <mether> yep
15:25:12 <mether> /usr/bin/hello
15:25:16 <nmudgal_> yes
15:25:19 <mether> we are going to be using some macros
15:25:24 <mether> to simplify things once more
15:25:41 * salvachn is back from partially eating, and part looking at the conversation
15:25:52 <mether> right after
15:25:55 <mether> %defattr
15:25:59 <mether> add
15:26:02 <mether> %{_bindir}/hello
15:26:14 <mether> the bindir macro stands for /usr/bin
15:26:34 <mether> the list of standard macros are at http://fedoraproject.org/wiki/Packaging/RPMMacros
15:26:44 <mether> salvachn, you got unpackaged files error. correct?
15:26:52 <mether> salvachn, i am just telling how to fix that
15:26:54 <salvachn> mether, yes
15:27:06 <mether> everyone added
15:27:09 <franciscod> [Ankur1@localhost ~]$ rpm --eval %{_bindir}
15:27:09 <franciscod> /usr/bin
15:27:13 <salvachn> I was looking here during dinner.
15:27:16 <nmudgal_> mether: yes
15:27:19 <praveenkumar> mether: yes added
15:27:21 <mether> whats the next file
15:27:49 <salvachn> /usr/share/info/dir is next
15:27:50 <nmudgal_> /usr/share/info/dir
15:28:03 <praveenkumar> /usr/share/info/dir
15:28:10 <mether> yes
15:28:12 <mether> and after that
15:28:30 <praveenkumar> /usr/share/info/hello.info.gz
15:28:33 <mether> yep
15:28:38 <mether> anyone knows what that is?
15:28:43 <mether> what is a info file?
15:29:04 <morpheuss> --info page
15:29:14 <mether> yep
15:29:18 <praveenkumar> it is show the information the packge is intalled or not or version info
15:29:24 <hakmn> info foo
15:29:31 <mether> GNU uses info files to describe what a particular software does
15:29:36 <mether> similar to man pages
15:29:42 <mether> but more descriptive
15:29:43 <mether> alright
15:29:48 <mether> so it is part of documentation
15:29:48 <nmudgal_> mether: hmm
15:29:50 <hakmn> yep
15:29:53 <mether> we need to tell RPM that
15:30:00 <mether> we use the %doc attribute for that
15:30:05 <mether> so add
15:30:06 <mether> %doc %{_mandir}/man1/hello.1.gz
15:30:11 * hakmn eating while building :)
15:30:14 <mether> oops
15:30:16 <mether> wrong line
15:30:17 <mether> %doc %{_infodir}/%{name}.info.gz
15:30:29 <mether> add %doc %{_infodir}/%{name}.info.gz
15:30:37 <mether> right after bindir
15:30:50 <mether> we are telling RPM hey
15:30:55 <salvachn> mether, %doc is empty in the default spec file.
15:30:55 <hakmn> below it or just a space
15:30:59 <mether> info file is part of our documentation
15:31:06 <balachandarkm> mether: please add the entire log file to your blog once the class is over.I should have come earlier.Bye.
15:31:08 <mether> salvachn, yes fill it up
15:31:14 <mether> balachandarkm, sure
15:31:33 <mether> done?
15:31:35 <nmudgal_> mether: should i overwrite %doc?
15:31:37 <mether> everyone added
15:31:39 <mether> %doc %{_infodir}/%{name}.info.gz
15:31:40 <gotunandan> yes
15:31:40 <salvachn> yeah
15:31:46 <nmudgal_> ok
15:32:10 <mether> you see a very large list
15:32:14 <mether> of .mo files
15:32:16 <mether> after that
15:32:20 <mether> right?
15:32:22 <praveenkumar> yeah
15:32:25 <nmudgal_> right
15:32:26 <mether> we will come to that later
15:32:29 <mether> what is the very last file
15:32:33 <mether> after all the mo files?
15:32:37 <gotunandan> mether and man page file at the end
15:32:40 <mether> yep
15:32:44 <mether> just like a info file
15:32:49 <mether> man page is also part of the documentation
15:32:55 <mether> so we need to tell rpm that as well
15:32:59 <nmudgal_> yes !
15:33:02 <salvachn> /usr/share/man/man1/hello.1.gz
15:33:04 <mether> add
15:33:05 <mether> %doc %{_mandir}/man1/hello.1.gz
15:33:26 <salvachn> added
15:33:26 <mether> again we are using macros instead of the direct path
15:33:29 <mether> done
15:33:36 <mether> only thing left is translation files
15:33:40 <mether> the .mo files
15:33:43 <yevlempy> mether, yup
15:33:44 <nmudgal_> yes
15:34:15 <praveenkumar> yep
15:34:22 <nmudgal_> yes
15:34:25 <salvachn> mether, mo files are what we get after compiling portable object (po) files, right?
15:34:36 <mether> salvachn, yep. exactly
15:34:43 <mether> po files are the text files
15:34:45 <mether> mo
15:34:55 <mether> is the result
15:34:56 <nmudgal_> mether: i din't get salvachn please elaborate !
15:35:00 <mether> after compiling the po files
15:35:32 <mether> PO (portable object) is the text format
15:35:34 <mether> translators
15:35:54 <mether> use to translate a software in linux
15:36:04 <mether> essentially we extract all the strings
15:36:09 <mether> that should be translated
15:36:12 <mether> into a separate file
15:36:15 <mether> and give that to translators
15:36:23 <mether> who fill it up
15:36:43 <mether> does that make sense?
15:36:49 <nmudgal_> mether: yes
15:36:55 <yevlempy> yup
15:37:10 <hakmn> mether` !
15:37:13 <mether> we use what is called the gnu gettext library
15:37:15 <mether> for doing this
15:37:21 <mether> pretty much all the linux programs
15:37:25 <mether> use this library
15:37:32 <hakmn> mether` whats the command
15:37:39 <mether> hakmn, what command
15:37:48 <hakmn> for doing this translation
15:38:25 <mether> there are multiple editors
15:38:54 <nmudgal_> like ?
15:38:57 <mether> kbabel
15:39:00 <mether> gtranslator
15:39:01 <mether> poedit
15:39:03 <mether> and others
15:39:28 <mether> we will do a separate workshop on L10N (localization) later
15:39:30 <mether> lets get back
15:39:33 <mether> to building our package
15:39:45 <nmudgal_> mether: okay !
15:39:49 <mether> we have a long list of mo files
15:39:50 <gotunandan> yes
15:39:54 <praveenkumar> yes
15:40:20 <salvachn> yes
15:40:29 <nmudgal_> yes
15:40:37 <mether> we can use something like    /usr/share/locale/*/LC_MESSAGES/hello.mo
15:40:45 <mether> to catch them all
15:40:49 <mether> but there is a even better
15:40:50 <yevlempy> ok
15:40:51 <mether> shortcut
15:40:59 <nmudgal_> macro ?
15:41:15 <gotunandan> must be ! :)
15:41:21 <praveenkumar> again use macro ?
15:41:40 <mether> described
15:41:41 <mether> at
15:41:42 <mether> https://fedoraproject.org/wiki/Packaging:Guidelines#Handling_Locale_Files
15:41:45 <mether> yep
15:41:49 <mether> a macro as usual :-)
15:42:01 <mether> as I said earlier
15:42:08 <mether> we are using the gnu gettext library
15:42:15 <mether> so we need to add a dependency
15:42:23 <mether> we need it to build the package
15:42:28 <mether> not run the package
15:42:40 <mether> so it is BuildRequires: gettext
15:42:48 <mether> there are two types of dependencies
15:42:50 <gotunandan> %BuildRequires comes into play ?
15:42:53 <gotunandan> rihgt ok
15:42:54 <mether> what we need to compile the package
15:42:59 <mether> what we need to run the package
15:43:12 <mether> for example you need a compile to build a package
15:43:19 <mether> you dont need it while running the binary
15:43:24 <mether> so we have BuildRequires:
15:43:28 <mether> and Requires
15:43:37 <mether> BuildRequires: gettext
15:43:40 <mether> means
15:43:51 <mether> we need that library
15:44:01 <mether> to handle the translation parts of the hello program
15:44:05 <mether> which are called locale files
15:44:10 <mether> clear?
15:44:15 <mether> everyone added that?
15:44:16 <nmudgal_> so mether is it installed already in fedora ?
15:44:17 <salvachn> yep
15:44:20 <gotunandan> yea
15:44:31 <mether> nmudgal_, yes
15:44:35 <nmudgal_> yes
15:44:42 <mether> so
15:44:43 <franciscod> mether: i need to go out to eat dinner, mess etc will close other wise.
15:44:44 <mether> next step
15:44:49 <mether> franciscod, go ahead
15:45:08 <mether> in the %install section
15:45:10 <mether> add
15:45:12 <mether> %find_lang %{name}
15:45:21 <mether> find the language or locale files
15:45:27 <mether> from the package name which is hello
15:45:33 <mether> thats what the macro means
15:45:37 <mether> clear?
15:45:46 <nmudgal_> clear !
15:45:55 <mether> that has a counter part in the files section
15:45:56 <gotunandan> yes
15:46:01 <mether> %files -f %{name}.lang
15:46:20 <mether> add -f %{name}.lang
15:46:24 <mether> to the %files line
15:46:27 <mether> done?
15:46:31 <salvachn> done
15:46:35 <nmudgal_> why counter ?
15:46:54 <mether> find_lang collects the files
15:47:11 <mether> %{name}.lang
15:47:16 <mether> adds it to %files section
15:47:27 <mether> so find all the locale files
15:47:32 <mether> and add it to %files
15:47:39 <mether> is what we are telling rpmbuild
15:47:42 <mether> via the macro
15:47:43 <mether> clear?
15:47:49 <praveenkumar> ok
15:47:51 <hakmn> yup
15:47:52 <nmudgal_> ok
15:47:57 <mether> nmudgal_, does that make sense?
15:48:04 <nmudgal_> mether: yup
15:48:14 <mether> so instead of specifying a long long list
15:48:16 <mether> of mo files
15:48:27 <gotunandan> the %files section is just -f ..... or %files -f .... ?
15:48:33 <mether> we simply use a smart macro
15:48:44 <mether> gotunandan, whats the diff
15:48:55 <mether> it is the latter
15:49:13 <mether> so the line should look
15:49:13 <mether> %files -f %{name}.lang
15:49:15 <mether> done?
15:49:17 <mether> everyone?
15:49:19 <gotunandan> ok
15:49:21 <nmudgal_> done
15:49:21 <gotunandan> done
15:49:22 <hakmn> yup
15:49:24 <praveenkumar> yup
15:49:26 <morpheuss> yeah
15:49:32 <mether> lets get our baby building again
15:49:34 <mether> one more time
15:49:39 <praveenkumar> ok
15:49:40 <mether> rpmbuild -ba hello.spec
15:49:43 <nmudgal_> ok
15:50:00 * yevlempy is sorry had to go urgent
15:50:10 <mether> go ahead
15:50:14 <mether> you can read the logs later
15:50:20 <nmudgal_> mether: error again
15:50:25 <mether> what error this time
15:50:32 <salvachn> /usr/share/info/dir is not found
15:50:38 <praveenkumar> mether: error
15:50:39 <mether> everyone getting the same error?
15:50:48 <salvachn> Installed (but unpackaged) file
15:50:51 <nmudgal_> info file error
15:51:04 <salvachn> mether, add this one too to %doc ?
15:51:04 <praveenkumar> mether: nopes
15:51:05 <hakmn> /usr/share/info/hello.info.gz not found
15:51:20 <hakmn> man error too
15:51:24 <mether> hakmn, %doc %{_infodir}/%{name}.info.gz
15:51:26 <nmudgal_> is it ? http://fpaste.org/1ay1/
15:51:28 <praveenkumar> "error: Bad exit status from /var/tmp/rpm-tmp.Rc4h9o (%install)"
15:51:32 <mether> %doc %{_mandir}/man1/hello.1.gz
15:51:40 <mether> hakmn, you forgot
15:51:56 <salvachn> praveenkumar, clear the files as root and then try
15:51:59 <mether> nmudgal_, you also forgot
15:52:31 <mether> the %files section should look like this
15:52:32 <mether> %files -f %{name}.lang
15:52:32 <mether> %defattr(-,root,root,-)
15:52:32 <mether> %{_bindir}/hello
15:52:32 <mether> %doc %{_mandir}/man1/hello.1.gz
15:52:32 <mether> %doc %{_infodir}/%{name}.info.gz
15:52:43 <praveenkumar> salvachn: using yum clean all ?
15:52:47 <mether> salvachn, nmudgal_ praveenkumar  make sure of that
15:52:49 <nmudgal_> mether:  no i didn't
15:52:51 <salvachn> praveenkumar, no.
15:53:06 <salvachn> praveenkumar, did u run rpmbuild as root?
15:53:40 <salvachn> mether, those four lines are in verbatim in my spec file.
15:53:41 <gotunandan> i dont think we need to be root for any of this ?
15:53:48 <mether> we never should be
15:53:50 <mether> root
15:53:52 <praveenkumar> salvachn: nopes normal user mode
15:53:54 <salvachn> gotunandan, we dont need be
15:53:56 <mether> while building a package
15:54:17 <mether> <salvachn>    /usr/share/info/dir is not found
15:54:20 <mether> is the right error
15:54:20 <salvachn> praveenkumar, remove all files in BUILDROOT directory under rpmbuils
15:54:24 <hakmn> mether` now 1 error or /info/dir only :)
15:54:27 <mether> everyone getting it?
15:54:32 <gotunandan> one error : RPM build errors:     Installed (but unpackaged) file(s) found:    /usr/share/info/dir
15:54:33 <gotunandan> yes
15:54:33 <hakmn> sure
15:54:33 <praveenkumar> salvachn: ok
15:54:42 <mether> praveenkumar, you check too
15:54:50 <praveenkumar> mether: checking
15:54:59 <mether> gotunandan, correct
15:55:02 <nmudgal_> mether: http://fpaste.org/1ay1/ these are my errors
15:55:26 <mether> nmudgal_, show your spec
15:55:38 <mether> so we forgot to specify a directory
15:55:39 <hakmn> nmudgal_` %files -f %{name}.lang
15:55:39 <hakmn> %defattr (-,root,root,-)
15:55:39 <hakmn> %{_bindir}/hello
15:55:39 <hakmn> %doc %{_infodir}/%{name}.info.gz
15:55:39 <hakmn> %doc %{_mandir}/man1/hello.1.gz
15:55:50 <nmudgal_> mether:  http://fpaste.org/JamD/
15:55:51 <mether> we shouldnt be including that in our package at all
15:55:57 <mether> we need to remove it
15:56:06 <salvachn> praveenkumar, delete files under BUILD and BUILDROOT directories.
15:56:07 <mether> because it is common across all software with info files
15:56:11 <mether> and will conflict with other packages
15:56:16 <mether> how do we remove it?
15:56:17 <mether> simple
15:56:37 <mether> to the %install section
15:56:38 <mether> add
15:56:39 <mether> rm -f $RPM_BUILD_ROOT%{_infodir}/dir
15:56:46 <mether> everyone do that
15:56:51 <praveenkumar> salvachn: same error
15:57:11 <salvachn> praveenkumar, check your %install section
15:57:25 <mether> nmudgal_, you have two %files
15:57:37 <mether> nmudgal_, you need to replace the first instance with the second instance
15:57:42 <mether> so instead of %files
15:57:45 <hakmn> yeah
15:57:46 <mether> at the top
15:57:55 <mether> replace it with
15:57:56 <mether> %files -f %{name}.lang
15:58:05 <mether> nmudgal_, do that
15:58:08 <mether> and also add
15:58:14 <mether> rm -f $RPM_BUILD_ROOT%{_infodir}/dir
15:58:19 <mether> to the %install section
15:58:22 <mether> everyone done?
15:58:27 <salvachn> done
15:58:28 <gotunandan> yeah
15:58:34 <hakmn> yup
15:58:40 <mether> rpmbuild -ba again
15:58:50 <dilipkhanolkar2> can anyone help me with whats the support channel
15:58:59 <mether> dilipkhanolkar, #fedora
15:59:03 <praveenkumar> salvachn: http://www.fpaste.org/u6qD/
15:59:13 <salvachn> mether, generated binary and source rpms :-)
15:59:27 <mether> everyone able to get binary and source rpms??
15:59:49 <hakmn> yes
16:00:00 <nmudgal_> mether: now this http://fpaste.org/XxJV/
16:00:02 <salvachn> praveenkumar, add the lines to %install.
16:00:03 <mether> anyone still has errors?
16:00:11 <salvachn> the empty section throws errors
16:00:14 <gotunandan> same error
16:00:22 <praveenkumar> salvachn: which one
16:00:28 <hakmn> mether` exit 0 :)
16:00:34 <salvachn> praveenkumar, one sec
16:00:34 <mether> nmudgal_, you forgot find_lang macro
16:00:37 <mether> in your spec file
16:00:44 <praveenkumar> salvachn: ok
16:00:55 <mether> nmudgal_, your %install section should have %find_lang %{name}
16:01:02 <mether> nmudgal_, add that please
16:01:18 <salvachn> praveenkumar, http://www.fpaste.org/xyhb/
16:01:21 <mether> anyone else has errors?
16:01:37 <gotunandan> mether : http://fpaste.org/Teog/
16:01:57 <mether> gotunandan, any errors?
16:02:00 <gotunandan> RPM build errors:     Installed (but unpackaged) file(s) found:    /usr/share/info/dir
16:02:12 <mether> rm rm -f $RPM_BUILD_ROOT%{_infodir}/dir
16:02:16 <mether> should be after make install
16:02:17 <nmudgal_> mether: still error same as gotunandan
16:02:18 <mether> not before it
16:02:36 <salvachn> praveenkumar, edit your %install section
16:02:36 <gotunandan> ok
16:02:39 <mether> because the directory is getting created by make install
16:02:42 <mether> if you remove it
16:02:47 <mether> make will add it again
16:02:53 <mether> and we are back to square one :-)
16:02:57 <mether> the order is important
16:02:58 <praveenkumar> salvachn: ok
16:03:06 <mether> everyone fix that
16:03:15 <mether> and you will finally able to build the rpm
16:03:21 <nmudgal_> mether: my spec http://fpaste.org/Z5Y8/
16:03:46 <gotunandan> mether, built
16:03:57 <salvachn> mether, built rpms.
16:04:02 <mether> nmudgal_, you are still getting it wrong
16:04:15 <morpheuss> nmudgal_: %files -f %{name}.lang <-- remove thsi line from install
16:04:15 <mether> nmudgal_, you see a %files line?
16:04:31 <mether> replace that with
16:04:32 <mether> %files -f %{name}.lang
16:04:40 <nmudgal_> mether: please clearify !
16:04:41 <mether> remove it from %install
16:05:02 <mether> praveenkumar, whats your status
16:05:21 <praveenkumar> mether: "File not found: /home/daredevil/rpmbuild/BUILDROOT/hello-2.6-1.fc12.i386/usr/bin.info.gz}/hello"
16:05:37 <salvachn> mether, praveenkumar's spec uses hello 2.6
16:05:40 <mether> praveenkumar, show me your spec. it has a typo
16:05:59 <morpheuss> { missing i guess
16:06:02 <mether> you are mixing up two lines
16:06:06 <mether> definitely
16:06:14 <morpheuss> or }} double
16:06:22 <mether> praveenkumar, show me your spec
16:06:26 <nmudgal_> mether: should i add %files line in %files section ?
16:06:29 <mether> nmudgal_, you fixed it?
16:06:40 <mether> salvachn, show nmudgal_ your spec file
16:06:43 <salvachn> praveenkumar, remove .bin.info.gz from bin_dir
16:06:48 <morpheuss> nmudgal_: replace %file with %files -f %{name}.lang
16:06:59 * salvachn pointd nmudgal_ to http://www.fpaste.org/xyhb/
16:06:59 <morpheuss> remove %files -f %{name}.lang from %install
16:07:18 <mether> nmudgal_, check your spec againstwhat salvachn has provided and fix it
16:07:54 <mether> everyone except praveenkumar  and nmudgal_  got the rpms?
16:08:03 <praveenkumar> mether: http://www.fpaste.org/hALq/
16:08:12 <nmudgal_> mether: done
16:08:18 <morpheuss> yeah done
16:08:30 <mether> praveenkumar, you messed up %{_bindir}.info.gz}/hello
16:08:38 <mether> it should
16:08:54 <salvachn> praveenkumar, change line 40
16:08:56 <mether> %{_bindir}/hello
16:09:00 <salvachn> remove .info.gz
16:09:00 <nmudgal_> mether: i was getting you wrong ! :)
16:09:09 <mether> nmudgal_, yeah. i understood that
16:09:25 <mether> praveenkumar, you are close.  just fix that line and you are with everyone else
16:09:38 <mether> now folks. just because you got the binary rpms
16:09:40 <mether> doesnt mean
16:09:43 <mether> you got it right
16:09:46 <salvachn> we need to check
16:09:49 <salvachn> lint?
16:09:52 <praveenkumar> mether: done
16:09:56 <mether> in fact all of you have to fix one important thing
16:10:02 <mether> praveenkumar, able to build
16:10:09 <mether> info files go into a info database
16:10:10 <nmudgal_> mether: what is that ?
16:10:17 <mether> and there is a command
16:10:17 <praveenkumar> mether: yeah got roms
16:10:19 <mether> install-info
16:10:20 <praveenkumar> cd ..
16:10:20 <mether> for that
16:10:28 <mether> we need to make some more modifications
16:10:34 <mether> to handle
16:10:44 <mether> this time info is a run time requirement for hello program
16:10:46 <mether> meaning
16:10:51 <mether> if you want to see the info pages
16:10:57 <mether> you need the info software
16:10:59 <mether> so
16:11:02 <mether> Requires
16:11:03 * salvachn thinks a video tour of building a rpm will be great for new users.
16:11:18 <mether> compare
16:11:21 <mether> what you all already have
16:11:23 <mether> with
16:11:24 <mether> https://fedoraproject.org/wiki/A_Short_RPM_Tutorial
16:11:27 <mether> the spec in
16:11:41 <mether> first it adds
16:11:42 <mether> Requires(post): info
16:11:42 <mether> Requires(preun): info
16:11:48 <mether> everyone do that
16:12:01 <mether> then
16:12:06 <mether> after the %install section
16:12:08 <mether> you see
16:12:09 <mether> %post
16:12:09 <mether> /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
16:12:09 <mether> %preun
16:12:09 <mether> if [ $1 = 0 ] ; then
16:12:09 <mether> /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
16:12:11 <mether> fi
16:12:21 <mether> these two modifications
16:12:29 <mether> handle the info files appropriately
16:12:40 <mether> i will explain it a bit more in detail
16:12:44 <mether> but just do it for now
16:12:51 <mether> and rebuild your spec file
16:13:03 <mether> anyone done that already?
16:13:06 <nmudgal_> add these lines mether
16:13:13 <mether> yes
16:13:36 <mether> everyone copy paste that
16:13:45 <mether> requires and %post and %preun
16:13:54 <mether> once you are done
16:13:58 <salvachn> mether, done
16:14:00 <mether> run rpmbuild again
16:14:01 <gotunandan> built
16:14:05 <mether> you get binary and source rpms
16:14:11 <mether> congrats
16:14:21 <mether> you managed to build your first perfect package
16:14:30 <gotunandan> :)
16:14:32 <mether> how do we know it actually works
16:14:38 <mether> one simple way is to install
16:14:39 <mether> it
16:14:54 <salvachn> mether, rpmlint ?
16:14:56 <mether> sudo rpm -ivh <path/to/binary-rpm>
16:15:02 <mether> salvachn, i am coming to that
16:15:06 <mether> but lets install and check it
16:15:07 <mether> works
16:15:08 <mether> first
16:15:09 <salvachn> okay.
16:15:20 <mether> after you install
16:15:21 <mether> it
16:15:22 <mether> run
16:15:23 <salvachn> mether, it works. am installing the rpm to a VM just in case :-)
16:15:23 <mether> hello
16:15:30 <mether> salvachn, thats good
16:15:51 <mether> everyone built and installed?
16:16:22 <nmudgal_> mether: done :)
16:16:25 <mether> run
16:16:26 <mether> hello
16:16:29 <hakmn> mether` done
16:16:31 <salvachn> mether, does everyone use sudo? I prefer su -c
16:16:37 <salvachn> done. ran and it works.
16:16:38 <gotunandan> Hello, world!
16:16:38 <mether> salvachn, whatever works for you
16:16:41 <nmudgal_> type hello & you get hello world is it mether
16:16:41 <mether> not important
16:16:43 <nmudgal_> ?
16:16:48 <mether> yep
16:16:52 <mether> everyone gets that?
16:17:03 <mether> rpm -e hello
16:17:07 <mether> will remove the package
16:17:11 <mether> if you run hello again
16:17:16 <mether> you will get command not found
16:17:28 <mether> quick check is done
16:17:47 <hakmn> yup done
16:17:51 <praveenkumar> done
16:17:55 <gotunandan> yes done
16:18:30 <mether> now there is a command called rpmlint
16:18:35 <mether> that catches common mistakes
16:18:41 <mether> to really verify that
16:18:44 <salvachn> done
16:18:46 <mether> you have run rpmlint
16:18:50 <mether> against the spec file
16:18:53 <mether> and binary
16:19:08 <mether> and source packages
16:19:34 <mether> i talked about binary and source
16:19:40 <mether> there is a third package as well though
16:19:46 <mether> called debuginfo
16:19:49 <salvachn> mether, I get "name-repeated-in-summary" warning on the source and binary rpms.
16:19:52 <mether> everyone saw that?
16:20:04 <praveenkumar> yeah
16:20:14 <salvachn> yes
16:20:17 <mether> salvachn, rpmlint -I <message> will tell you what that means
16:20:21 <gotunandan> yes
16:20:34 <hakmn> mether` !
16:20:36 <mether> this contains the debug information for the software
16:20:42 <mether> it is useful
16:20:45 <mether> for example
16:20:48 <mether> when there is a crash
16:20:51 <mether> and you want to know
16:20:51 <mether> why
16:20:55 <hakmn> run rpmlint against spec, srpm,rpm ?
16:21:06 <mether> you have to run rpmlint against debug info package
16:21:07 <mether> as well
16:21:28 <mether> hakmn, yes.  spec binary, source and debuginfo packages
16:21:34 <mether> run rpmlint against all of them
16:21:47 <mether> rpmlint will show warnings and errors at times
16:21:59 <gotunandan> yes
16:22:00 <mether> and rpmlint -I  <message> will explain what those means
16:22:12 <mether> you can fix them usually by understanding what it means
16:22:18 <mether> salvachn, what did you get
16:22:22 <salvachn> mether, I did it.
16:22:22 <mether> by running
16:22:33 <mether> rpmlint -I name-repeated-in-summary
16:22:40 <salvachn> Program name was repeated in summary. so it might have looked awkward
16:22:42 <mether> did you understand what it means
16:22:46 <mether> correct
16:22:47 <gotunandan> http://fpaste.org/AyGU/
16:22:52 <praveenkumar> every thing running fine no error
16:23:13 <mether> gotunandan, perfect
16:23:20 <mether> salvachn, you fixed yourrs?
16:23:23 * salvachn got "The name of the package is repeated in its summary.  This is often redundant
16:23:23 <salvachn> information and looks silly in various programs' output.  Make the summary
16:23:23 <salvachn> brief and to the point without including redundant information in it.
16:23:23 <salvachn> "
16:23:35 <mether> what was the summary before
16:23:40 <mether> and how did you fix it
16:23:41 <salvachn> mether, yes. fixed. rpmlint shows no errors or warnings now.
16:24:03 <salvachn> mether, edited Summary:
16:24:08 <mether> from what to what
16:24:14 <mether> i am just asking for everyone to learn
16:24:17 <mether> from your mistake
16:24:43 <salvachn> "The sample GNU Hello program" to "A sample rpm test program"
16:24:48 <mether> so does everyone have no rpmlint warnings
16:24:53 <hakmn> no
16:25:03 <mether> no errors
16:25:06 <mether> everyone is good
16:25:09 <salvachn> yeah
16:25:14 <mether> everyone has hello package installed
16:25:16 <mether> ?
16:25:22 <mether> lets play with it a little bit
16:25:26 <praveenkumar> yeah no error or no warning
16:25:33 <morpheuss> mether: sure :)
16:25:43 <mether> run rpm -qi hello
16:25:47 <mether> rpm -qd hello
16:25:52 <mether> rpm -ql hello
16:26:21 <mether> -qi =  query information
16:26:32 <mether> which is straight out of the first section of your spec file
16:26:36 <mether> you see that?
16:26:38 <mether> next is
16:26:43 <mether> query documentation
16:26:44 <mether> qd
16:26:54 <mether> which shows the files you have marked as documentation
16:26:58 <salvachn> -qd: doc files, -ql: l10n files.
16:27:08 <rtnpro> cool
16:27:08 <mether> rpm -ql
16:27:10 <mether> query list
16:27:15 <mether> which will list all the files
16:27:27 <mether> RPM uses a database to store all that information
16:27:35 * salvachn remembers to use less for large output
16:27:39 <mether> and it knows all that because you provided the data in your spec file
16:27:50 <mether> there are minor tweaks possible
16:27:52 <mether> in this spec
16:27:56 <mether> but we are pretty good
16:27:58 <mether> at this point
16:28:14 <mether> congrats everyone for sitting through with me for 3 hours on this session
16:28:27 <praveenkumar> :)
16:28:29 <mether> and learning to build a pretty good and fairly complex program
16:28:30 <salvachn> mether, thanks. I learnt quite a lot.
16:28:40 <morpheuss> thanks mether
16:28:42 <hakmn> thanx mether
16:28:44 <praveenkumar> mether: thank
16:28:45 <mether> despite the pretty boring output
16:28:46 <mether> :-)
16:28:53 <hakmn> :D
16:28:55 <mether> the package is fairly complex
16:29:02 <mether> because of L10N files
16:29:04 <gotunandan> it was brilliant :)
16:29:04 <mether> info files
16:29:05 <mether> man page
16:29:06 <morpheuss> it was quite interesting :)
16:29:07 <mether> and binary
16:29:14 <morpheuss> mether: !
16:29:18 <mether> morpheuss, shoot
16:29:40 <morpheuss> As a package maintainer we are going to package different kind of stuff
16:29:44 <mether> yes
16:29:52 <morpheuss> from games to applications etc.,
16:29:56 <mether> yes
16:30:05 <morpheuss> whats the best way to approach the packaging
16:30:17 <mether> meaning?
16:30:33 <morpheuss> since each kind of package will have different kind of working and configurations
16:30:33 <mether> the general approach I take
16:30:43 <mether> is to build the binary
16:30:44 <mether> from source
16:30:48 <mether> without using rpm
16:30:57 <morpheuss> ok
16:30:57 <mether> understand how it actually builds first
16:31:02 <mether> read the configure --help
16:31:05 <mether> read the make file
16:31:10 <mether> and go through the sources quickly
16:31:11 <mether> just a glance
16:31:15 <morpheuss> ok
16:31:21 <salvachn> mether, I once tried creating a spec for songbird for three days, and finally gave up. For such programs, is there any way?
16:31:22 <mether> and then fill in the sections one by one
16:31:29 <mether> and repeatedly run rpmbuild
16:31:32 <mether> trial and error
16:31:34 <mether> to fix the mistakes
16:31:36 <mether> and gaps
16:31:48 <morpheuss> mether: ok
16:32:00 <mether> salvachn, that was a very messy package and songbird dropped linux support. program got forked as well
16:32:04 <mether> there is a long review request
16:32:06 * nmudgal is checking logs due to internet connection problem dc
16:32:08 <mether> for songbird
16:32:12 <mether> in google
16:32:14 <mether> search for
16:32:22 <mether> fedora package review songbird
16:32:23 <morpheuss> mether: thanks :)
16:32:30 <mether> for learning what was done with it
16:32:32 <morpheuss> will keep that in mind
16:32:41 <mether> you need a lot of patience
16:32:41 <salvachn> mether, the spec I found on rutgers.rdu for songbird was very long winded.
16:32:57 <mether> salvachn, yeah. it was a very complex piece of software
16:33:05 <mether> not everything is  a hello world program
16:33:07 <mether> obviously
16:33:23 <mether> if the software is complex, the spec file will reflect its complexity
16:33:27 <mether> rpm has lots of macros
16:33:31 <mether> to handle common cases
16:33:33 <gotunandan> mether, what were the two additions "post and preun
16:33:37 <mether> and fedora has extensive guidelines
16:33:40 <mether> at
16:33:40 <salvachn> mether, I hope packaging gnome applets and kde plasmoids will not be that hard.
16:33:59 <mether> https://fedoraproject.org/wiki/Packaging:Guidelines
16:34:06 <salvachn> mether, the official docs for fedora are the best for any OS I've used.
16:34:14 <mether> salvachn, nope. you can cheat
16:34:22 <mether> the best way to actually write spec files
16:34:27 <mether> is not write them from scratch
16:34:32 <mether> but find a close match
16:34:34 <mether> and modify it
16:34:40 <mether> so if you are packaging a gnome applet
16:34:45 <mether> take a look at the spec file
16:34:49 <mether> or an existing applet
16:34:50 <morpheuss> mether: so is there any way of judging how complex packaging gonna be for a particular source (apart from size ;) )
16:34:52 <mether> that is packaged
16:35:04 <mether> morpheuss, difficult. comes with experience
16:35:17 <mether> morpheuss, just like the hello world program
16:35:17 <morpheuss> mether: oh i see
16:35:20 <mether> things that look simple
16:35:23 <mether> are not necessarily
16:35:24 <salvachn> mether, the fundamental philosophy of free software :-) find a file, edit it for ur use, and mention the original author
16:35:25 <mether> simple
16:35:27 <nmudgal> mether: let's say i try for assualt cube a game building rpm package then it needs seperate dependecies to install from source files then how to add those depedency into spec just name like we did in hello or what ?
16:35:37 <mether> nmudgal, yep
16:35:40 <mether> same concepts
16:35:52 <mether> Fedora spec files are all at
16:35:52 <mether> cvs.fedoraproject.org/viewvc/rpms
16:36:03 <mether> #link http://cvs.fedoraproject.org/viewvc/rpms
16:36:13 <mether> there are thousands and thousands of spec files
16:36:23 <mether> i am sure you can find one that is close to what you want
16:36:26 <mether> just reuse it
16:36:33 <mether> and mention that in your changelog
16:36:45 <mether> - modified spec from foo
16:36:47 <mether> you are good to go
16:36:50 <hakmn> mether` but how to determine dependencies for a source ?
16:37:00 <mether> good question
16:37:07 <mether> we used rpmbuild now
16:37:12 <mether> but that is not the best way
16:37:20 <mether> because we dont know whether it is picking up
16:37:21 <mether> dependencies
16:37:24 <nmudgal> mether: then we need to download those dependecy & install seperately or spec will see it on it's own just by mentioning name in it ?
16:37:28 <mether> from what is already installed on your sytem
16:37:33 <mether> there is a tool called mock
16:37:38 <mether> which builds the rpm
16:37:40 <mether> in a chroot
16:37:45 <mether> and will fail
16:37:49 <mether> if the dependencies
16:37:53 <mether> are not strictly defined
16:37:57 <mether> for example
16:38:11 <mether> rpmbuild succeeded for you folks
16:38:22 <mether> despite not specifying the BuildRequires
16:38:26 <mether> in the first instance
16:38:30 <hakmn> yes
16:38:33 <mether> what was our BuildRequires?
16:38:35 <nmudgal> yes
16:38:39 <hakmn> gettext
16:38:41 <nmudgal> gettext
16:38:43 <mether> correct
16:38:45 <mether> why?
16:38:53 <mether> because gettext was already installed in your systems
16:38:54 <hakmn> cuz of info,man pages
16:39:06 <nmudgal> it is translator library we need
16:39:06 <nmudgal> if it is not then mether ?
16:39:13 <mether> it would have failed
16:39:16 <mether> so how do we know
16:39:26 <mether> that use has gettext on his/her system
16:39:31 <mether> if we did not specify it?
16:39:34 <mether> mock uses a chroot
16:39:36 <mether> and will fail
16:39:46 <mether> if the dependencies are not explicit
16:39:52 <mether> that is why we recommend using it
16:39:56 <mether> instead of rpmbuild
16:40:16 <mether> i am not going to covering mock now
16:40:21 <mether> but it is all described at
16:40:22 <mether> http://fedoraproject.org/wiki/Projects/Mock
16:40:25 <nmudgal> but user has to install dependency if no is there seperately ?
16:40:29 <mether> and the rpm tutorial linked earlier
16:40:30 <hakmn> ohk,
16:40:37 <mether> also has mentioned it
16:40:40 <mether> please go through that
16:40:43 <mether> and try using it
16:40:48 <mether> if you have any problems come and ask me
16:40:53 <mether> i am usually in this channel
16:41:09 <mether> everyone who attended this workshop
16:41:12 <mether> please drop me a email
16:41:13 <mether> to
16:41:18 <mether> sundaram@fedoraproject.org
16:41:26 <mether> so that i can follow up with you folks later on
16:41:34 <mether> nmudgal, that is why we use yum
16:41:40 <mether> yum will download
16:41:43 <mether> dependencies
16:41:46 <mether> when requires
16:41:49 <mether> and install them
16:41:51 <mether> automatically
16:42:00 <mether> as long as you have done the packaging properly
16:42:06 <hakmn> mether` yum uses mock ?
16:42:14 <mether> no no
16:42:14 <gotunandan> mether, yum does not allow me to install this hello rpm package, because it is unsigned ?
16:42:17 <nmudgal> mether: let's say we have no internet & only want to use rpm then ?
16:42:21 <mether> mock is for building a package
16:42:28 <mether> and yum is for installing a package
16:42:33 <mether> mock uses yum internally
16:42:36 <mether> not viceversa
16:42:39 <hakmn> mether` yes
16:42:56 <mether> gotunandan, yeah you got to use --nogpgcheck to install it
16:43:05 <mether> all Fedora packages are signed by default
16:43:19 <mether> yum will check for gpg sign and will fail by default
16:43:21 <mether> for security reasons
16:43:29 <mether> since you built that package locally
16:43:36 <mether> you can use --nogpgcheck
16:43:38 <mether> to install it
16:43:56 <hakmn> mether` i can make local repo & put this hello.rpm there
16:43:59 <mether> nmudgal, in that case there are other solutions like packagekit service packs and running your own repository
16:44:06 <mether> out of scope for this workshop
16:44:13 <hakmn> yum install hello --nogpgcheck
16:44:16 <mether> i will maybe cover all that in a different workshop
16:44:21 <salvachn> mether, any resources for packagekit service packs?
16:44:30 <mether> salvachn, google? :-)
16:44:40 <nmudgal> mether: ohhk means rpm packages doesn't handles dependency problem actually ? :)
16:44:43 <mether> hakmn, yeah that would work
16:44:45 <salvachn> mether, yeah, (s)he is our best friend.
16:45:01 <mether> nmudgal, rpm is a low level tool. yum is what you would normally use
16:45:07 <mether> rpm specifies the dependencies
16:45:12 <mether> yum downloads them
16:45:13 <gotunandan> mether, ahh thanks !
16:45:20 <hakmn> mether` rpm is not the solution for dependency resolving
16:45:32 <mether> rpm is a package manager
16:45:45 <mether> yum is a dependency resolver using rpm internally
16:45:49 <mether> as long as your spec file
16:45:53 <mether> has the build requires
16:45:55 <mether> and requires
16:46:00 <mether> specified correctly
16:46:04 <mether> your packages will work fine
16:46:18 <mether> good packages = yum does the right job
16:46:19 <hakmn> mether` you said that mock will check for BuildRequires !
16:46:27 <nmudgal> means we can't install vlc even without yum through rpm if we have dependecy problem
16:46:27 <mether> hakmn, yes
16:46:48 <hakmn> but how will we know what does BUild Requires should consist of ?
16:47:02 <mether> hakmn, you look at the error message
16:47:03 <morpheuss> nmudgal: install dependency one by one then install vlc :)
16:47:07 <nmudgal> hakmn: use mock ! i think isn't it mether ?
16:47:08 <mether> and figure it out
16:47:14 <morpheuss> depndencies*
16:47:24 <mether> nmudgal, no. again. mock is for building packages
16:47:29 <mether> yum is for installing them
16:48:02 <morpheuss> mether: go to go now,thanks for the great class :)
16:48:04 <mether> a good quality repository will have all the packages and dependencies together
16:48:07 <nmudgal> morpheuss: ok got it !
16:48:09 <mether> alright
16:48:12 <gotunandan> installing dependencies one by one is fun... haha !
16:48:17 <mether> if anyone else has any questions
16:48:20 <mether> about hello package
16:48:22 <mether> ask
16:48:23 <mether> otherwise
16:48:29 <mether> i am ending this session now
16:48:33 <mether> we can still continue talking later
16:48:43 <mether> any last minute questions?
16:48:55 <mether> or shall i end?
16:48:56 <hakmn> no, just last minute thanxgiving
16:49:08 <nmudgal> mether: thanks for the great session :)
16:49:10 <hakmn> thanx for conducting mether
16:49:14 <gotunandan> mether, post and preun ?
16:49:19 <mether> alright. thanks everyone for attending. hope to see good quality packages from you all
16:49:23 <mether> gotunandan, yes
16:49:31 <mether> let me explain that briefly
16:49:31 <gotunandan> or later ?
16:49:42 <mether> preun
16:49:43 <mether> stands
16:49:46 <gotunandan> i'll mail you , you can reply back....
16:49:49 <mether> for preuninstall
16:49:53 <mether> which means do
16:49:54 <mether> this job
16:49:59 <mether> before installing the package
16:50:03 <mether> %post
16:50:07 <mether> is post installation
16:50:08 <hakmn> mether` whats diff between build requires & requires ?
16:50:12 <gotunandan> cleanup jobs
16:50:15 <mether> do this job
16:50:19 <mether> after installation
16:50:28 <mether> %post installs the info file
16:50:34 <mether> scripts
16:50:34 <gotunandan> and post install would be something to setup after installing that particular rpm
16:50:39 <mether> and preu
16:50:46 <mether> removes the info file from the info db
16:50:50 <gotunandan> like a new kernel would want to run update-grub ?
16:50:52 <mether> and then rpm will remove the entire package
16:50:57 <mether> gotunandan, precisely
16:51:06 <mether> gotunandan, take a look at grub spec
16:51:13 <mether> and you will see a parallel
16:51:18 <mether> fedora-cvs  grub
16:51:26 <mether> and it will download it for you
16:51:29 <mether> all the branches
16:51:31 <mether> take a look
16:51:35 <mether> fedora-cvs  <package name>
16:51:42 <gotunandan> ok
16:51:43 <mether> hakmn, i explained that earlier
16:51:47 <mether> build requires
16:51:53 <mether> is what you need to compile the package
16:52:01 <mether> requires is what you need to run the package
16:52:12 <mether> compiling in this case requires gettext library
16:52:16 <mether> to convert po files
16:52:19 <mether> to mo files
16:52:28 <mether> but gettext is not needed to run the package
16:52:31 <mether> so gettext
16:52:37 <mether> here is a build requirement
16:52:42 <mether> and info is a run time requirement
16:52:49 <mether> hakmn, understood?
16:53:19 <mether> not further questions?
16:53:46 <mether> ok
16:53:49 <mether> ending the meeting
16:53:50 <gotunandan> none :), thanks a lot
16:53:50 <mether> in
16:53:52 <mether> 5
16:53:53 <mether> 4
16:53:55 <mether> 3
16:53:56 <mether> 2
16:53:57 <mether> 1
16:54:00 <mether> #endmeeting