LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-06-2011, 12:47 AM   #1
D1ver
Member
 
Registered: Jan 2010
Distribution: Slackware 13.37
Posts: 598
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Quick newbie questions relating to Debian and apt


Hello,
I've recently been playing around with Debian and I quite like it. There are a few things though that I'd like some clarification on. I'm not sure they're big enough points to warrant separate threads, if a moderator feels differently please let me know.

1) Coming from mostly a Slackware background I'm used to being able to compile specific versions of software using the package management system. Is there a way to do something like this using apt/dpkg? For examples sake, lets say I wanted to install wine 1.3.12. I'd imagine it'd be something like this
Code:
apt-get build-dep wine
configure 
make 
/* apt/dpkg command that 'make installs' and builds a .deb package */
Is there a Debian way to do this?

2) Somewhat related to above, is there a way to pull single packages out of testing/unstable repos? For example, I like squeeze, but the Nvidia-glx package is too outdated for me. I'd like to use Debian methods rather than just downloading and running the Nvidia .sh file..

3) Can someone give me a generic sources.list file for running testing? The FAQ's all say to just search/replace squeeze with wheezy, but doing so gives me some 404 errors when I try to run apt-get update.

Thanks in advance.
 
Old 07-06-2011, 01:28 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Hi D1 and welcome
I'll just answer your quetion #2. What you want is called alt-pinning. This allows you to install selected packages from testing or unstable (assuming you're using stable). 1. Set up your preference file as explained here. 2. Add the relevant repos to sources.list (the testing and unstable ones). 3. Execute as root or use sudo on the following command:
Code:
aptitude -t unstable install <name of package>
That's it.
ciao,
jdk

Last edited by jdkaye; 07-06-2011 at 01:33 AM.
 
1 members found this post helpful.
Old 07-06-2011, 01:53 AM   #3
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Question #3

Quote:
3) Can someone give me a generic sources.list file for running testing? The FAQ's all say to just search/replace squeeze with wheezy, but doing so gives me some 404 errors when I try to run apt-get update.
Hi again,
There is a "sticky" posted at the top of this (i.e. Debian) forum containing loads of sample sources.list files. Have a look there and I'm sure you'll find what you need. If not, let us know.
ciao,
jdk
 
Old 07-06-2011, 03:23 AM   #4
D1ver
Member
 
Registered: Jan 2010
Distribution: Slackware 13.37
Posts: 598

Original Poster
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Thanks jdk, very helpful!

I probably should have checked the stickies before posting
 
Old 07-06-2011, 03:31 AM   #5
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Quote:
Originally Posted by jdkaye View Post
Hi D1 and welcome
I'll just answer your quetion #2. What you want is called alt-pinning. This allows you to install selected packages from testing or unstable (assuming you're using stable). 1. Set up your preference file as explained here. 2. Add the relevant repos to sources.list (the testing and unstable ones). 3. Execute as root or use sudo on the following command:
Code:
aptitude -t unstable install <name of package>
That's it.
ciao,
jdk
Installing packages from testing/unstable in a stable system is a very bad idea. Occasionally it will work but will upgrade half your system to unstable in the process... twelve months from now it's very likely not to work at all... you could end up with a broken system.

Generally testing, unstable and experimental are mixed, stable is not mixed with any of those. If you want newer packages in stable then you should first look at the backports repo: http://backports-master.debian.org/Instructions/

If what you want isn't in the backports repo then you're looking at backporting the package yourself from the package source from unstable: http://www.debianuserforums.org/viewtopic.php?f=9&t=127

Last edited by cynwulf; 07-06-2011 at 03:33 AM.
 
Old 07-06-2011, 07:30 AM   #6
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Quote:
Originally Posted by D1ver View Post
1) Coming from mostly a Slackware background I'm used to being able to compile specific versions of software using the package management system. Is there a way to do something like this using apt/dpkg? For examples sake, lets say I wanted to install wine 1.3.12. I'd imagine it'd be something like this
Code:
apt-get build-dep wine
configure 
make 
/* apt/dpkg command that 'make installs' and builds a .deb package */
Is there a Debian way to do this?
For this, you need checkinstall (it's in the repositories), then you just have to execute:

Code:
apt-get build-dep wine
configure 
make
checkinstall -D
It won't be a "professional" package, but it will be suitable for your own use.

BTW, I second Caravel's suggestion about not mixing Stable with Testing or Unstable and use the backports system or the Testing/Unstable sources instead of the binaries.

Regards.
 
Old 07-06-2011, 07:50 AM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
1. http://www.debian.org/doc/manuals/maint-guide/
 
Old 07-06-2011, 12:47 PM   #8
j1alu
Member
 
Registered: Apr 2009
Distribution: debian gnu/linux
Posts: 798

Rep: Reputation: Disabled
The debian-reference says:
Quote:
The newbie Debian system administrator should stay with the stable release of Debian while applying only security updates. I mean that some of the following valid actions are better avoided, as a precaution, until you understand the Debian system very well. Here are some reminders.

* Do not include testing or unstable in "/etc/apt/sources.list".
* Do not mix standard Debian with other non-Debian archives such as Ubuntu in "/etc/apt/sources.list".
* Do not create "/etc/apt/preferences".
* Do not change default behavior of package management tools through configuration files without knowing their full impacts.
* Do not install random packages by "dpkg -i <random_package>".
* Do not ever install random packages by "dpkg --force-all -i <random_package>".
* Do not erase or alter files in "/var/lib/dpkg/".
* Do not overwrite system files by installing software programs directly compiled from source.
Install them into "/usr/local" or "/opt", if needed.
from here:
http://www.debian.org/doc/manuals/de..._prerequisites
If you follow those rules you can go a long way without any trouble.

If pure stable is not ok for you, "outdated", there are several solutions. Installing packages directly from testing or unstable is not one of them (but most have already been mentioned).
 
Old 07-06-2011, 02:16 PM   #9
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,883
Blog Entries: 28

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
Building Debian packages from Source
apt-get source [-b] <package> Download the source Debian package for <package> and extract it. You must have deb-src lines in your /etc/apt/sources.list for this to work. If you supply the `-b' option and you are currently root, then the package will be automatically built if possible.

apt-get build-dep <package> Download and install the packages necessary to build the source Debian package <package>. This feature is only present in apt version 0.5 and up. Currently this means that woody and above contain this functionality. If you have an older version of apt then the easiest way to find out the build dependencies is to look in the debian/control file in the source package directory. A common usage of this command is in conjunction with apt-get source -b. For example (as root):

apt-get build-dep <package>
apt-get source -b <package>

Will download the source package, all of its build dependencies, and attempt to compile the source package.

dpkg-source -x <package.dsc> If you have downloaded the source package for a program manually, which includes several files such as a .orig.tar.gz (or .tar.gz if it is Debian native), a .dsc, and a .diff.gz (if it is not Debian native), then you can unpack the source package using this command on the .dsc file.

dpkg-buildpackage Builds a Debian package from a Debian source tree. You must be in the main directory of the source tree for this to work. Sample usage:

dpkg-buildpackage -rfakeroot -uc -b

Where `-rfakeroot' instructs it to use the fakeroot program to simulate root privileges (for ownership purposes), `-uc' stands for ``Don't cryptographically sign the changelog'', and `-b' stands for ``Build the binary package only''

debuild A handy wrapper script around dpkg-buildpackage that will automatically take care of using fakeroot or not, as well as running lintian and gpg for you. This script is provided by (rogram ), so you need to install this package first.
 
Old 07-06-2011, 05:53 PM   #10
D1ver
Member
 
Registered: Jan 2010
Distribution: Slackware 13.37
Posts: 598

Original Poster
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Thanks for the great responses everyone, I think I have enough to work with

Marking as solved. Thanks!
 
  


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
apt-get problem relating to Bacula TheOpposite Linux - Server 2 01-18-2010 05:14 PM
Quick Newbie Questions Celsius032 Linux - Newbie 6 07-04-2006 10:26 AM
Several questions relating to Debian BaptismOfFire Debian 10 08-30-2004 11:37 AM
Quick questions: Slack and apt MockieMoo Slackware 2 08-20-2004 03:10 AM
quick question relating boot cmack Arch 3 08-23-2003 03:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:19 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