Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

compile util-linux from github

User discussion about Debian Development, Debian Project News and Announcements. Not for support questions.
Post Reply
Message
Author
tuxxie
Posts: 23
Joined: 2016-01-03 14:04

compile util-linux from github

#1 Post by tuxxie »

Here running debian testing. How can I compile util-linux from github and make it work?

https://github.com/karelzak/util-linux/

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: compile util-linux from github

#2 Post by debiman »

a) clone the repo to your machine
b) run ./autogen.sh
c) run make
with a little luck it will Just Work (tm).
i would not install it, since it might conflict with likely already installed util-linux.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: compile util-linux from github

#3 Post by stevepusser »

Why exactly do you need the version from git?

If you really need some bug fix that's only available there, my first inclination would be to try to cherry-pick the fix, patch, and rebuild the version you have in Buster. My thoughts are that you can really mess up your system by trying the manual build and install, since it's an essential "required" package, and you cannot remove the Debian version from your system.
MX Linux packager and developer

tuxxie
Posts: 23
Joined: 2016-01-03 14:04

Re: compile util-linux from github

#4 Post by tuxxie »

stevepusser wrote:Why exactly do you need the version from git?

If you really need some bug fix that's only available there, my first inclination would be to try to cherry-pick the fix, patch, and rebuild the version you have in Buster. My thoughts are that you can really mess up your system by trying the manual build and install, since it's an essential "required" package, and you cannot remove the Debian version from your system.
How can I exactly get, compile and install the Buster version, provided that I know what exact lines have to be patched?

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: compile util-linux from github

#5 Post by debiman »

please tell us why you think you need to do this.
"i just want to" is a valid answer, but if you think you need this to fix some problem, your approach is likely wrong.
http://xyproblem.info/

tuxxie
Posts: 23
Joined: 2016-01-03 14:04

Re: compile util-linux from github

#6 Post by tuxxie »

debiman wrote:please tell us why you think you need to do this.
"i just want to" is a valid answer, but if you think you need this to fix some problem, your approach is likely wrong.
http://xyproblem.info/
i want to test latest commits, which are not yet available with apt install. I've tried installing gentoo but it's a total nightmare with the emerge system and dependencies and masked packages and whatnot.

Tried also compiling directly from github with ./autogen.sh && ./configure && make, but messes the system, had to revert to previous snapshot. I'm used to work on user small programs with git checkout && make install && ldconfig but util-linux is too way embedded on the system.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: compile util-linux from github

#7 Post by debiman »

tuxxie wrote:i want to test latest commits, which are not yet available with apt install.
ok.
then see my previous answer.
Tried also compiling directly from github with ./autogen.sh && ./configure && make, but messes the system, had to revert to previous snapshot.
i don't see how this would mess up your system.
all these commands do not require superuser privileges, don't change your system, and do not install anything (as i wrote you shouldn't).
util-linux is too way embedded on the system.
i'll say it a third time, if you don't install it, you can use most utilities straight from the git directory, after compiling.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: compile util-linux from github

#8 Post by stevepusser »

Basically rebuilding the present package is the same as backporting, except you're just using the deb-src URL for testing.

https://wiki.debian.org/SimpleBackportCreation

After you have run "apt-get source", you want to go in and change the source files as you wish. Then you back out to the root of the source, and have dpkg-source convert your changes into a patch in debian/patches:

Code: Select all

dpkg-source --commit
After you name your patch, it will open it up in nano for editing, but you can just "Ctrl X" to exit nano without any edits at this point. Make sure to edit your new stanza in debian/changelog and remove the "~", which make it lower than the Debian version, and make yours higher.
MX Linux packager and developer

tuxxie
Posts: 23
Joined: 2016-01-03 14:04

Re: compile util-linux from github

#9 Post by tuxxie »

debiman wrote:
util-linux is too way embedded on the system.
i'll say it a third time, if you don't install it, you can use most utilities straight from the git directory, after compiling.
Ok you got me there, didn't know that was possible. I would like to run lsblk, blkid, fdisk and so on. Hope I can run them from my home user folder (with sudo if necessary). If that works I just don't need to make a custom deb.
Last edited by tuxxie on 2018-04-28 20:30, edited 1 time in total.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: compile util-linux from github

#10 Post by debiman »

tuxxie wrote:I would like to run lsblk, blkid, fdisk and so on. Hope I can run them from my home user folder (with sudo if necessary). If that works I just didn't need to make a custom deb.
why the "need" of these particular utilities?
previously you said "want", which sounds like some sort of just-for-fun project.
i still suspect an x-y-problem.

tuxxie
Posts: 23
Joined: 2016-01-03 14:04

Re: compile util-linux from github

#11 Post by tuxxie »

Ok what I need works for now, all utilities are just inside the util-linux/ folder just after compiling. Now I can test the commands properly with sudo ./command

tuxxie
Posts: 23
Joined: 2016-01-03 14:04

Re: compile util-linux from github

#12 Post by tuxxie »

bypassing the debuild nightmare:
dpkg-buildpackage -b

tuxxie
Posts: 23
Joined: 2016-01-03 14:04

Re: compile util-linux from github

#13 Post by tuxxie »

This guide is great:
Ubuntu Packaging Guide »

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: compile util-linux from github

#14 Post by debiman »

tuxxie wrote:This guide is great:
Ubuntu Packaging Guide »
please don't spread unsuitable recommendations.
this is the debian forum, and debian is not compatible with ubuntu: https://wiki.debian.org/DontBreakDebian

imo, x-y-problems are a waste of everyone's time, but it seems you are set to not tell us what problem you are actually trying to solve.
whatever. :shrugs:

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: compile util-linux from github

#15 Post by stevepusser »

The commands are essentially the same in Ubuntu and Debian, though.
MX Linux packager and developer

tuxxie
Posts: 23
Joined: 2016-01-03 14:04

Re: compile util-linux from github

#16 Post by tuxxie »

debiman wrote:imo, x-y-problems are a waste of everyone's time, but it seems you are set to not tell us what problem you are actually trying to solve.
whatever. :shrugs:
Told you already, want to test several util-linux commands with latest commits or my own patches.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: compile util-linux from github

#17 Post by debiman »

well then my previous answers are still valid:
make without installing them, and tehy won't interfere with your system.

your phrasing "need" seemed to suggest something beyond simply trying out things.

Post Reply