Linux - SoftwareThis 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
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.
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.
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.
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.