Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-12-2012, 04:36 AM
|
#1
|
Member
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 351
Rep:
|
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.
|
|
|
12-12-2012, 05:39 AM
|
#2
|
Senior Member
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669
|
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.
|
|
|
12-12-2012, 10:12 AM
|
#3
|
MLED Founder
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453
|
Quote:
Originally Posted by FeyFre
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.
|
12-12-2012, 10:15 AM
|
#4
|
Member
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 351
Original Poster
Rep:
|
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.
|
|
|
12-12-2012, 10:19 AM
|
#5
|
Member
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 351
Original Poster
Rep:
|
@kikinovak, I have already answered: most of actions cannot be automated.
Last edited by FeyFre; 12-12-2012 at 10:37 AM.
|
|
|
12-12-2012, 11:24 AM
|
#6
|
LQ Guru
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,372
|
Write your own SlackBuild.
|
|
|
12-13-2012, 02:12 AM
|
#7
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928
|
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.
|
|
|
12-13-2012, 12:52 PM
|
#8
|
Member
Registered: Aug 2010
Distribution: Slackware
Posts: 192
Rep: 
|
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
|
|
|
12-13-2012, 01:53 PM
|
#9
|
Member
Registered: Apr 2010
Distribution: Slackware
Posts: 497
Rep: 
|
Quote:
Originally Posted by kikinovak
I'm using Vim. Works great.
|
lol i was gonna say the same. Although lately i'm getting mellow and use mousepad.
|
|
|
12-13-2012, 01:58 PM
|
#10
|
Member
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 351
Original Poster
Rep:
|
@NonNonBa, yes, something like that, but with option to exclude well know volatile zones(/tmp, /var/log, /dev, etc).
|
|
|
12-13-2012, 04:01 PM
|
#11
|
Member
Registered: Aug 2010
Distribution: Slackware
Posts: 192
Rep: 
|
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
|
|
|
All times are GMT -5. The time now is 11:19 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|