LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-27-2012, 05:04 AM   #1
McZ
Member
 
Registered: Aug 2012
Posts: 46

Rep: Reputation: Disabled
tar and symlinks? (slackware like packages)


I want to build and compress lots of source packages to slackware like packages.

And I know that Slackwares makepkg is creating a script for all symlinks for that package and removes the symlink.

So now I want to know if there is any problem with tar:ing a symlink?

if I do like this
Code:
cd package-1.1
./configure
make
make DESTDIR=/fakeroot install
cd /fakeroot
tar cfz . ../package-1.1.tar.gz (or something like that)
Will the symlinks uncompress correctly when I want to install the package? or is there a chance the symlinks may be broken during unpacking?
 
Old 08-27-2012, 05:33 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,691

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
tar will not process/update or adjust symlinks. You can use -h (--dereference) to follow symlinks and pack the files instead of the links. (otherwise yes, those symlinks may or may not be broken)
 
Old 08-27-2012, 06:02 AM   #3
McZ
Member
 
Registered: Aug 2012
Posts: 46

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
tar will not process/update or adjust symlinks. You can use -h (--dereference) to follow symlinks and pack the files instead of the links. (otherwise yes, those symlinks may or may not be broken)
So if I want to store and make sure my symlinks is correct when extracting my package I have to do a slackware like solution and script my symlinks, or?
I don't want to use -h to store the same file twice I want to save the symlink.
 
Old 08-27-2012, 07:37 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,691

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
that looks something like dependencies among packages. tar itself cannot handle it, so yes, you need another solution
 
  


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
how do you install tar.gz or tar packages icedlightblue Linux - Newbie 23 11-04-2007 03:02 PM
Tar and symlinks Johng Programming 5 01-07-2007 10:02 AM
tar and symlinks? neocookie Linux - General 2 08-07-2006 05:08 AM
tar not keeping permissions of symlinks exodist Linux - Software 1 06-14-2006 08:33 PM
Symlinks in packages questions shotokan Slackware 2 02-25-2006 01:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:25 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration