Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 626994 - net-misc/iputils: Makefile initialize variable with value from git command
Summary: net-misc/iputils: Makefile initialize variable with value from git command
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2017-08-03 17:01 UTC by eNca
Modified: 2017-10-28 14:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eNca 2017-08-03 17:01:03 UTC
When I try to reinstall iputils when git is not installed then the build fail with error message "git command not found". I think there is missing build time dependency on git.
Tried with net-misc/iputils-20151218

> # emerge -1 iputils --with-bdeps=y
> Calculating dependencies  
>  * IMPORTANT: 9 news items need reading for repository 'gentoo'.
>  * Use eselect news read to view new items.
> 
> ... done!
> >>> Verifying ebuild manifests
> >>> Jobs: 0 of 1 complete, 1 running                Load avg: 0.02, 0.10, 0.15
> >>> Emerging (1 of 1) net-misc/iputils-20151218::gentoo
> >>> Jobs: 0 of 1 complete, 1 running                Load avg: 0.02, 0.10, 0.15
> >>> Jobs: 0 of 1 complete                           Load avg: 0.02, 0.10, 0.15
> >>> Installing (1 of 1) net-misc/iputils-20151218::gentoo
> >>> Jobs: 0 of 1 complete                           Load avg: 0.02, 0.10, 0.15
> >>> Failed to install net-misc/iputils-20151218, Log file:
> >>> Jobs: 0 of 1 complete                           Load avg: 0.02, 0.10, 0.15
> >>>  '/var/tmp/portage/net-misc/iputils-20151218/temp/build.log'
> >>> Jobs: 0 of 1 complete                           Load avg: 0.02, 0.10, 0.15
> >>> Jobs: 0 of 1 complete, 1 failed                 Load avg: 0.02, 0.10, 0.15
> 
>  * Package:    net-misc/iputils-20151218
>  * Repository: gentoo
>  * Maintainer: base-system@gentoo.org
>  * USE:        abi_x86_64 amd64 arping elibc_glibc ipv6 kernel_linux ssl userland_GNU
>  * FEATURES:   preserve-libs sandbox userpriv usersandbox
> >>> Unpacking source...
> >>> Unpacking iputils-s20151218.tar.bz2 to /var/tmp/portage/net-misc/iputils-20151218/work
> >>> Unpacking iputils-s20151218-manpages.tar.xz to /var/tmp/portage/net-misc/iputils-20151218/work
> >>> Source unpacked in /var/tmp/portage/net-misc/iputils-20151218/work
> >>> Preparing source in /var/tmp/portage/net-misc/iputils-20151218/work/iputils-s20151218 ...
>  * Applying 021109-uclibc-no-ether_ntohost.patch ...
>  [ ok ]
>  * Applying iputils-99999999-openssl.patch ...
>  [ ok ]
>  * Applying iputils-99999999-tftpd-syslog.patch ...
>  [ ok ]
>  * Applying iputils-20121221-makefile.patch ...
>  [ ok ]
>  * Applying iputils-20121221-parallel-doc.patch ...
>  [ ok ]
>  * Applying iputils-20121221-strtod.patch ...
>  [ ok ]
> >>> Source prepared.
> >>> Configuring source in /var/tmp/portage/net-misc/iputils-20151218/work/iputils-s20151218 ...
> >>> Source configured.
> >>> Compiling source in /var/tmp/portage/net-misc/iputils-20151218/work/iputils-s20151218 ...
> make -j5 USE_CAP=no USE_IDN=no USE_GCRYPT=no USE_CRYPTO=yes LDFLAG_RESOLV=-lresolv 'IPV4_TARGETS=ping arping' IPV6_TARGETS=ping6 
> /bin/sh: git: command not found
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2017-08-03 17:52:29 UTC
Confirmed, but this is not critical. From Makefile:

> [...]
> # -------------------------------------
> IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
> IPV6_TARGETS=tracepath6 traceroute6 ping6
> TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
> 
> LDLIBS=$(LDLIB) $(ADDLIB)
> 
> UNAME_N:=$(shell uname -n)
> LASTTAG:=$(shell git describe HEAD | sed -e 's/-.*//')
> TODAY=$(shell date +%Y/%m/%d)
> DATE=$(shell date --date $(TODAY) +%Y%m%d)
> TAG:=$(shell date --date=$(TODAY) +s%Y%m%d)
> [...]

https://github.com/iputils/iputils/blob/master/Makefile#L124


So when the Makefile will be called and LASTTAG isn't set, it calls `git describe HEAD...`. The variable isn't used in the following targets we use.
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2017-08-03 18:21:57 UTC
https://github.com/iputils/iputils/pull/95
Comment 3 David Heidelberg (okias) 2017-08-18 22:19:23 UTC
FIXED [1]

[1] https://github.com/iputils/iputils/commit/ef1c71104f9eb7bbcc5f7977779b9f75359074e4
Comment 4 Larry the Git Cow gentoo-dev 2017-10-28 14:47:00 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=698832458c8639ad939bf5743a91cb512029707c

commit 698832458c8639ad939bf5743a91cb512029707c
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2017-10-28 14:44:27 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2017-10-28 14:46:02 +0000

    net-misc/iputils: Bump to v20171016 (snapshot release)
    
    Closes: https://bugs.gentoo.org/626994
    Package-Manager: Portage-2.3.13, Repoman-2.3.4

 net-misc/iputils/Manifest                    |   2 +
 net-misc/iputils/iputils-20171016_pre.ebuild | 175 +++++++++++++++++++++++++++
 2 files changed, 177 insertions(+)