LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-02-2019, 04:21 AM   #1
muqor
LQ Newbie
 
Registered: Feb 2019
Posts: 15

Rep: Reputation: Disabled
How to create deb package for ubuntu 18.04


Hello, I am newbie and I want to build deb package for ubuntu 18.04.

I found this article help me, https://askubuntu.com/questions/8481...771109a588bced.

My question is, Is it safe to build deb package using sudo privilege? Because I have to use sudo checkinstall instead of checkinstall to create the package.

TIA
 
Old 04-02-2019, 03:43 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,993

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
Not sure exactly what you wish to do but this is a better page for a staring point on .deb packages I'd think. https://wiki.debian.org/HowToPackageForDebian

In that page they suggest a jail.
 
1 members found this post helpful.
Old 04-02-2019, 07:28 PM   #3
muqor
LQ Newbie
 
Registered: Feb 2019
Posts: 15

Original Poster
Rep: Reputation: Disabled
Pardon me the confusion. I am trying to create Debian package from source, eg nginx with mod-security. In the article I attached explain that to create debian package we can use checkinstall command line. I have tested it and it works well, but it needs sudo permission to build the package. I create the package in a vps server, then I copy the package to another vps server as a production server for blogging using WordPress. I want my production server have the software that I need and free from development software.

My question is, is it safe to create debian package in this way?

TIA

Last edited by muqor; 04-03-2019 at 09:03 PM.
 
Old 04-04-2019, 12:34 AM   #4
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by muqor View Post
My question is, is it safe to create debian package in this way?

TIA
I would say, since you need to be root or sudo to install packages, same applies for checkinstall.
Here's a more appropriate link.
 
Old 04-04-2019, 01:57 AM   #5
muqor
LQ Newbie
 
Registered: Feb 2019
Posts: 15

Original Poster
Rep: Reputation: Disabled
Hmm, I have been thinking, why should I create deb package if I can install it without creating the package.
 
Old 04-04-2019, 07:16 AM   #6
lm8
Member
 
Registered: Oct 2012
Distribution: Debian Linux, AntiX, Win32, FreeBSD, Android
Posts: 80

Rep: Reputation: Disabled
If you install to your home directory you don't need sudo. The Homebrew package management system avoids sudo and uses this sort of technique to build packages. The reason you typically want to use some package manager to install rather than just installing without one is to make it easier to remove or update the package/library/program. It can also track dependencies for you if you're installing more than one library or application, so that modifying/updating/removing one library/application one doesn't mess up any others.
 
Old 04-04-2019, 07:25 AM   #7
lm8
Member
 
Registered: Oct 2012
Distribution: Debian Linux, AntiX, Win32, FreeBSD, Android
Posts: 80

Rep: Reputation: Disabled
If you don't want to build a deb package directly but still want to use Debian package management, an easier method might be to build the package and during the make install have the package installed in a subdirectory under your home directory. Most makefiles have an install option for a destination directory (DESTDIR). Once the files are in a known location, you can gzip and tar the files to create a tarball. Then, you can use the alien program to create a .deb file from the tarball. You will still have to deal with the file permissions issue if you install outside your home directory though. Haven't found a better way to create a deb file (especially if my files are already in a tarball format), but would be interested to hear if someone knows an easier method.
 
Old 04-08-2019, 09:40 AM   #8
muqor
LQ Newbie
 
Registered: Feb 2019
Posts: 15

Original Poster
Rep: Reputation: Disabled
I have tried to uninstall .deb package using this command line, but not working : sudo dpkg -r package.deb

Do you know why?
 
Old 04-08-2019, 10:27 AM   #9
muqor
LQ Newbie
 
Registered: Feb 2019
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
Not sure exactly what you wish to do but this is a better page for a staring point on .deb packages I'd think. https://wiki.debian.org/HowToPackageForDebian

In that page they suggest a jail.
Hi again, Can I copy file from the jail directory to the outside directory, eg my "real home" directory?

Thanks
 
Old 04-08-2019, 02:52 PM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,913

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
Quote:
Originally Posted by muqor View Post
I have tried to uninstall .deb package using this command line, but not working : sudo dpkg -r package.deb

Do you know why?
No, if you won't post details. We cannot see your host.

Quote:
Originally Posted by muqor View Post
Hi again, Can I copy file from the jail directory to the outside directory, eg my "real home" directory?

Thanks
yes, you can copy, from outside you can see the jailed directory too (at least I think).
 
Old 04-23-2019, 11:17 PM   #11
muqor
LQ Newbie
 
Registered: Feb 2019
Posts: 15

Original Poster
Rep: Reputation: Disabled
if in some way I can copy the file from inside chroot, Is it safe to use the file like install it on my vps?

Thanks
 
  


Reply

Tags
debian 9, ubuntu 18.04



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] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 14 02-23-2021 08:35 PM
make only headers .deb package (no bin package)? dfatlq Linux - Kernel 0 02-25-2016 03:45 AM
extract deb package,change and create deb again ccc Debian 2 12-19-2014 11:40 PM
how to create a deb package from a source abd_bela Debian 1 03-04-2005 10:27 AM
How to create a .deb library package? FloFri Debian 3 05-03-2004 11:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:17 AM.

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