VectorLinux
August 20, 2014, 02:11:34 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1] 2
  Print  
Author Topic: Beginner packaging questions  (Read 5146 times)
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« on: April 29, 2009, 08:26:06 pm »

I'm starting to try package building on the VL Light partition on my Celeron desktop. Is this the right place to post questions about packaging?

I'm trying to package FontForge, a program for creating and editing Type 1, TrueType, OpenType, and other font formats and for converting one format to another. I downloaded the source from fontforge.sourceforge.net and first tried sbbuilder following directions posted in the forum. It failed, but I think I understand why. It was more trouble to fix the cause of the error than to try another method, so I tried again with vpackager. It also filed with this message:
****  + Determine source type ****

****  ~ vpackager is unable to recognize the nature of this source package ~
Aborting build process now.
FAILED ****

I then tried to build the package manually following the directions here: "HowTo: An in depth Guide to package building for the VL repository" ( http://ftp://64.50.238.52/.1/vectorlinux/docs/packaging/index.html ). This appears to be working. I've already done ./configure and make and the source compiled without error messages. Tomorrow I'll continue with the remaining steps.

I have some confusion over what I should put in the License section of the slack-desc file. FontForge uses the revised BSD license. This is the whole statement about licensing from the FontForge site on sourceforge.net:
Copyright © 2000,2001,2002,2003,2004,2005,2006,2007,2008 by George Williams

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Obviously, all of this won't fit on the License line in slack-desc. So what should I put there? BSD? revised BSD? I assume the entire licensing statement above will appear in some file after the package is created.

If I'm successful, I'll let you know and if the build fails, I'll ask for help if I can't Google a solution.
--GrannyGeek
Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
kc1di
Packager
Vectorian
****
Posts: 1125


Morse Code Early digital mode. John 3:16


« Reply #1 on: April 30, 2009, 02:11:16 am »

Hi Granny,

Glad your giving it a try.

all you need in the license  line is BSD , you may want to put a statement such as (see Documentation.)

But BSD covers it.  anything that you can build mannually should work in sbbuilder.  Vpackager does not always produce a package acceptable by the repository.  but Mannually should work ok too.  Good Luck. Let us know how you make out.
Dave
Logged

Dave
( Living Somewhere in Maine USA)
Registered Linux User #462608
M0E-lnx
Administrator
Vectorian
*****
Posts: 3179



« Reply #2 on: April 30, 2009, 03:41:17 am »

You should also consider using sbbuilder now. vpackager development is sort of on hold for the time being. this is so i can work on the installer. The packaging standards have changed since the last time i made a vpackager release, so some new features need to be implemnted, and oh yeah... bugs need to be fixed. I am considering the posibility of implementing sbbuilder integration into it, but until a new release is made, you should really use sbbuilder for building packages for the repos

hth
Logged

stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« Reply #3 on: May 01, 2009, 10:32:08 am »

Hello all:

I to am trying my hand at building a package.  Like Granny I am following the manual instructions here, ftp://64.50.238.52/.1/vectorlinux/docs/packaging/index.html.  I am doing pdfedit, because I know it has no other dependencies and should be an easy go.  I can ./configure (with options) and make no problem.
However, when I 'make install DESTDIR=/tmp/pdfedit-0.4.2' the package just installs where it normally would and does not install to the /tmp directory.

Can anyone give me an idea why? or another way to go about it?

I'll try again this evening.
stretchedthin
Logged

Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee
M0E-lnx
Administrator
Vectorian
*****
Posts: 3179



« Reply #4 on: May 01, 2009, 10:40:37 am »

Every now and then you run into one of those.

Not all makefiles support the DESTDIR argument.
Sometimes, you can get away with using something like fakeroot, or sometimes the  application supports some other argument like --root=/path/to/root

These are kind of hard.
Logged

GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #5 on: May 04, 2009, 06:36:58 pm »

I think I ran into that same problem when building FontForge with sbbuilder. I was not successful with sbbuilder, but I did make a package manually following the directions in the link stretchedthin posted.

I was totally tied up with something else from Friday to Monday and have a lot of computer catching up to do. Then I'll return to packaging. I noticed a slight error in my fontforge package and should be able to fix that. Not with sbbuilder, though. I have removed vpackager.

I think stretchedthin's pdfedit will be a great addition to the repos and I hope my fontforge package will be, too.
--GrannyGeek
Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« Reply #6 on: May 04, 2009, 07:05:57 pm »

Every now and then you run into one of those.

Not all makefiles support the DESTDIR argument.
Sometimes, you can get away with using something like fakeroot, or sometimes the  application supports some other argument like --root=/path/to/root

These are kind of hard.
Found it in the README file...need to configure using ...'--with-rot-dir=YOUR_INSTALLATION_ROOT_DIR'
Logged

Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #7 on: May 06, 2009, 12:36:54 pm »

I have built a package for FonrForge three times and things haven't seemed right any time. I did a manual build following the directions in http://ftp://64.50.238.52/.1/vectorlinux/docs/packaging/index.html . Everything seemed okay and there are slack-desc and slack-required files in the /tmp/fontforge-20090408/usr/install directory. However, after building the package I can't find a doinst.sh file. Also, when I do installpkg on the fontforge-20090408-i586-1vl60.tlz on my VL6 Deluxe partition, I get a "WARNING: Package has no description" despite the presence of a valid slack-desc file. So I must be doing something wrong, but I can't figure out what.

There are a few points in the "HowTo: An in depth Guide to package building for the VL repository" that are unclear to me. The guide says:
When compiling source code, GCC (the compiler) will look at the $CFLAGS and $CXXFLAGS variables to determine how the compiled code should be optimized. To set these optimizations to i586, we need to set the above mentioned variables.
Open a terminal, and logon as root. Then open /etc/profile.d/vasm.sh and make sure that this bit of text is presnt at the end of the file:
export CFLAGS=”-O2 -mtune=i686 -march=i586”
export CXXFLAGS=”$CFLAGS”

I did make sure that the proper "export" lines are in /vasm.sh, but whenever I log in I get this:
bash: export: `-mtune=i686': not a valid identifier
bash: export: `-march=i586': not a valid identifier

So what gives? Is this part of the guide obsolete or do I need to do something besides seeing that the proper "export" lines are in vasm.sh?

The next part of the guide where I'm confused is in the section on d) installing the compiled source into the package dir. It doesn't say to su to root before you do this but I thought make install was to be run as root. So I do su to root and then run
make install DESTDIR=/tmp/fontforge-20090408
and get the pseudo-installation in a /usr directory under /tmp/fontforge-20090408. So far so good, it seems. Then I think the guide is very unclear because it says:

e) make the package description

Next, you need to create the package description. This file is called slack-desc and must be placed in a directory called install.
mkdir install
mcedit install/slack-desc

WHERE are you supposed to make the install directory?? Under /tmp/fontforge-20090408? Under/usr in that directory? Under the main / directory (which I doubt, but I can't be sure)? I assume root has to mkdir because user doesn't have write permissions in the /tmp/fontforge-20090408 directory if make install was run as root.

This is my slack-desc file:
$SHIM|-----handy-ruler------------------------------------------------------|
$NAME: $NAME (Create, edit, convert Type 1, TT and other fonts)
$NAME:
$NAME: An outline font editor that lets you create your own
$NAME: postscript, truetype, opentype, svg, bitmap, and other
$NAME: types of fonts, or edit existing ones. Also lets you
$NAME: convert one format to another.
$NAME:
$NAME:
$NAME: License: BSD (see Documentation)
$NAME: Authors: George Williams
$NAME: Website: http://fontforge.sourceforge.net

I have also tried it with this slack-desc file:
$SHIM|-----handy-ruler------------------------------------------------------|
$NAME: $NAME (Create, edit, convert Type 1, TT and other fonts)
$NAME:
$NAME: An outline font editor that lets you create your own
$NAME: postscript, truetype, opentype, svg, bitmap, and other
$NAME: types of fonts, or edit existing ones. Also lets you
$NAME: convert one format to another.
$NAME:
$NAME: License: BSD (see Documentation)
$NAME: Authors: George Williams
$NAME: Website: http://fontforge.sourceforge.net

It is unclear to me whether the required 11 lines include the
$SHIM|-----handy-ruler------------------------------------------------------|
line and whether there should be a return at the end of the last line (Website). Would a return at the end of the last line count as an additional line for the slack-desc?

I do see a slack-required file in the same /tmp/fontforge-20090408/usr/install directory as the slack-desc file is in. I haven't gotten an error message when running makepkg.

So--
what do I do about the
bash: export: `-mtune=i686': not a valid identifier
bash: export: `-march=i586': not a valid identifier
messages? How do I get a doinst.sh file into the /install directory, and does that /install directory belong under /tmp/fontforge-20090408 or /tmp/fontforge-2009-0408/usr? Do you see what I'm doing wrong?

I wasn't able to get the package built with sbbuilder. You *do* know that reading something like this:
"This script will allow you to build a package with the very basic configurations, so its still up to you to add configure-time tweaks to it"
puts the fear of God into someone like me, who can barely stand to LOOK AT a script, much less figure out what it's doing and add tweaks to it?<g> Writing scripts is not my cup of tea, though I'm willing to run one someone else writes. That's the limit of my geekiness.
--GrannyGeek
Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« Reply #8 on: May 06, 2009, 03:07:44 pm »

Hi Granny,

When you open your slack-desc in a text editor does it look something like this....


# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

         |-----handy-ruler------------------------------------------------------|
fontforge: fontforge (FontForge Utility for edit outline bitmap fonts)
fontforge: FontForge allows you to edit outline and bitmap fonts. You may create
fontforge: new ones or modify old ones. It is also a format converter and can
fontforge: interconvert between PostScript (ascii & binary Type1, some Type3, some
fontforge: Type0), TrueType, OpenType (Type2), CID, SVG
fontforge:
fontforge:
fontforge: License: BSD
fontforge: Authors: Alexej Kryukov, Clytie Siddall, 7 more see website
fontforge: Website: http://sourceforge.net/projects/fontforge/




#----------------------------------------
BUILDDATE: Wed May  6 16:51:26 MDT 2009
PACKAGER:  ken
HOST:      Linux 2.6.27.12 i686
DISTRO:    Vector Linux 6.0 Standard Final Built on Feb-16-09
CFLAGS:    -O2 -march=i586 -mtune=i686
LDFLAGS:   
CONFIGURE:   $ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/man --with-included-gettext --disable-debug --program-prefix= --program-suffix= --build=i486-slackware-linux

Logged

Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee
stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« Reply #9 on: May 06, 2009, 05:53:43 pm »

You should try to build this again in sbbuilder, granny.  It will work without any script tweeking at all if you change the name of fontforge_full-20090408.tar.bz2.  to fontforge-20090408.tar.bz2.

I think sbbuilder assumes the names of the compressed tar file and the name of the uncompressed file inside it are going to match, and because of the _full part they do not.
Logged

Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee
rbistolfi
Packager
Vectorian
****
Posts: 2282


« Reply #10 on: May 07, 2009, 10:26:58 am »

You should try to build this again in sbbuilder, granny.  It will work without any script tweeking at all if you change the name of fontforge_full-20090408.tar.bz2.  to fontforge-20090408.tar.bz2.

I think sbbuilder assumes the names of the compressed tar file and the name of the uncompressed file inside it are going to match, and because of the _full part they do not.


Thats correct, its seems the best assumption for most of the cases. However it wont work 100% of the time.
The missing slack-desc warning use to happen when the name in the slack-desc doesnt match the name in the filename, that is, the name part in the package filename has to match the name part in the slack-desc, the one that starts in the beggining of each line until the colon.

Logged

"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #11 on: May 07, 2009, 06:24:53 pm »

I didn't have time to work on it today, but tomorrow I hope to start all over with the suggestions I've gotten here.

What should I do about the warning messages when I log in as I descibed in my previous post:

I did make sure that the proper "export" lines are in /vasm.sh, but whenever I log in I get this:
bash: export: `-mtune=i686': not a valid identifier
bash: export: `-march=i586': not a valid identifier

I'm determined to get a package built that meets VL packaging standards. I do find it fun to use VL6 Light.
--GrannyGeek
Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
rbistolfi
Packager
Vectorian
****
Posts: 2282


« Reply #12 on: May 08, 2009, 06:56:26 am »

Looks like a syntax error to me, bash is a bit picky. Be sure there is no white space between the variable name (CFLAGS), the assignation operator ("="), and the value (the thing between quotes).
This one is valid:
Code:
export CFLAGS=”-O2 -mtune=i686 -march=i586”

But this one is not:
Code:
export CFLAGS = ”-O2 -mtune=i686 -march=i586”

HTH
« Last Edit: May 08, 2009, 06:58:48 am by rbistolfi » Logged

"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #13 on: May 08, 2009, 02:17:48 pm »

Looks like a syntax error to me, bash is a bit picky. Be sure there is no white space between the variable name (CFLAGS), the assignation operator ("="), and the value (the thing between quotes).
This one is valid:
Code:
export CFLAGS=”-O2 -mtune=i686 -march=i586”

But this one is not:
Code:
export CFLAGS = ”-O2 -mtune=i686 -march=i586”

Thanks! It was indeed an error of mine. I hadn't noticed that the quotation marks were missing around CFLAGS="02 -mtune (etc.) and CXXFLAGS=”$CFLAGS” in vasm.sh. I corrected that, rebooted, logged in, and didn't get the error messages. So that part is now fixed.

I've built a package with sbbuilder and will now test it on my VL6 Deluxe partition.
--GrannyGeek
Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #14 on: May 08, 2009, 05:23:17 pm »

Success (I think)!

With sbbuilder I built fontforge-20090408-i586-1vl60.tlz on VL 6 Light. I installed the package on my VL6 Standard Deluxe partitions on two computers and FontForge is working in both. However, there is no fontforge.desktop file in /usr/share/applications. How can I fix that? Is every VL package supposed to include a *.desktop file?

Thanks, everyone, for all the help so far!
--GrannyGeek
Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!