LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-12-2012, 04:36 AM   #1
FeyFre
Member
 
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 307

Rep: Reputation: 22
Tool to create package from scratch


Hi

Is there any tool I can build slackware package from scratch. I mean, I have very uncontrollable software which does not knows what is "make install DESTDIR=/sandbox" and so on.
So I need a tool which allows me to do like next:
1. tool 1st-scan /path/to/sandbox
2. build, install, configure software manually
3. tool 2nd-sacn /path/to/sandbox
4. tool make-diff /path/to/sandbox
and optionally
5. tool make-package /path/to/sandbox
(or I shall do it using makepkg manually).

Tried slacktrack... it is not what I need.
 
Old 12-12-2012, 05:39 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: /root
Distribution: Slackware & BSD
Posts: 1,206

Rep: Reputation: 230Reputation: 230Reputation: 230
Have you tried source 2 package? Here.

If you will find an .rpm package you can turn it into a slackware package with rpm2tgz.

Try also how to create your own slackbuild script if this will serve your purpose.

Hope that helps.

Good luck.

Last edited by malekmustaq; 12-12-2012 at 05:43 AM.
 
Old 12-12-2012, 10:12 AM   #3
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: ElementaryOS, Ubuntu LTS, Slackware
Posts: 1,529

Rep: Reputation: 708Reputation: 708Reputation: 708Reputation: 708Reputation: 708Reputation: 708Reputation: 708
Quote:
Originally Posted by FeyFre View Post
Hi

Is there any tool I can build slackware package from scratch.
I'm using Vim. Works great.

http://www.microlinux.fr/slackware/14.0/source/

 
2 members found this post helpful.
Old 12-12-2012, 10:15 AM   #4
FeyFre
Member
 
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 307

Original Poster
Rep: Reputation: 22
src2pkg... I knew I forgot something, thanks.
rpm2tgz - no, it is not rpm. And in some cases, there is no sources at all(software already built and installed)
I cannot automate most of tasks, they have to be done manually, because of non-trivial interaction.
 
Old 12-12-2012, 10:19 AM   #5
FeyFre
Member
 
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 307

Original Poster
Rep: Reputation: 22
@kikinovak, I have already answered: most of actions cannot be automated.

Last edited by FeyFre; 12-12-2012 at 10:37 AM.
 
Old 12-12-2012, 11:24 AM   #6
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,611

Rep: Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414
Write your own SlackBuild.
 
Old 12-13-2012, 02:12 AM   #7
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,751

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
src2pkg provides four ways to isolate the installation when DESTDIR is not supported. They can be accessed using the options: -JAIL, -UNION, -REAL or -SAFE. The last two actually install the software to the final location, but 'track' the operations and then copy the resulting files into the package tree. The first two attempt to install the files into a sort of sandbox. The fifth method which src2pkg can use(the default method) is DESTDIR.

For things that are already installed, you can simply use makepkg after reconstructing the package content in your temp dir(sandbox). You can also script these builds using a SlackBuild which, in turn, calls makepkg. You can also create a *.src2pkg build script to do this, or to assemble packages from any unusual content -like loose files, etc.

src2pkg has the advantage of doing rigurous checks of the content for common errors. Using either a SlackBuild or src2pkg build script ensures the repeatability and documentation of the process.
 
Old 12-13-2012, 12:52 PM   #8
NonNonBa
Member
 
Registered: Aug 2010
Distribution: Slackware
Posts: 61

Rep: Reputation: 21
Well, if I correctly understand what you are looking for, maybe you can build a solution around timestamps.

Code:
touch .timestamp
... build your software and install files in /path/to/sandbox ...
find /path/to/sandbox -newer .timestamp # show the files you've installed
cd /path/to/sandbox
find * -newer .timestamp | cpio -dmp /path/to/pkgdir # copy them in a temporary root.
cd /path/to/pkgdir
makepkg [options] .
Would something like that float your boat?

Last edited by NonNonBa; 12-13-2012 at 03:57 PM. Reason: Don't copy the sandbox path into the temporary root
 
Old 12-13-2012, 01:53 PM   #9
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 345

Rep: Reputation: 56
Quote:
Originally Posted by kikinovak View Post
I'm using Vim. Works great.
lol i was gonna say the same. Although lately i'm getting mellow and use mousepad.
 
Old 12-13-2012, 01:58 PM   #10
FeyFre
Member
 
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 307

Original Poster
Rep: Reputation: 22
@NonNonBa, yes, something like that, but with option to exclude well know volatile zones(/tmp, /var/log, /dev, etc).
 
Old 12-13-2012, 04:01 PM   #11
NonNonBa
Member
 
Registered: Aug 2010
Distribution: Slackware
Posts: 61

Rep: Reputation: 21
You can add some "! -path xxx" option to the find listing the stuff to copy, or insert a "sed /^\(path1\|path2\|...\)$/d" between the find and cpio.

BTW, can you give an example of the unautomaticable software builds you have?

Last edited by NonNonBa; 12-14-2012 at 01:04 AM. Reason: ask for precision
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] About Zlib (1.2.6) package in Linux From Scratch Andrew_Kaunchy Linux From Scratch 2 05-02-2012 09:46 PM
Install Advanced Packaging Tool on a linux from scratch machine ledzepp4eva Linux - Newbie 7 12-16-2011 09:13 AM
6.7 Linus From Scratch, package linux-2.6.22.5 Geemo Linux - Newbie 12 11-30-2008 06:31 PM
why create a Linux From Scratch? blackman890 Linux From Scratch 4 03-25-2005 09:17 AM


All times are GMT -5. The time now is 02:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration