Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914367 - net-wireless/aircrack-ng-1.7-r3 doesn't install with both USE airdrop-ng and airgraph-ng
Summary: net-wireless/aircrack-ng-1.7-r3 doesn't install with both USE airdrop-ng and ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Rick Farina (Zero_Chaos)
URL:
Whiteboard:
Keywords:
: 914424 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-09-17 22:05 UTC by hangglider
Modified: 2023-11-10 01:05 UTC (History)
8 users (show)

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


Attachments
emerge-info (emerge.info,6.49 KB, text/plain)
2023-09-19 15:54 UTC, z4
Details
emerge -pqv information (emerge-pqv.info,284 bytes, text/plain)
2023-09-19 15:56 UTC, z4
Details
build.log for net-wireless/aircrack-ng:0 emerge (build.log,263.09 KB, text/plain)
2023-09-19 15:58 UTC, z4
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hangglider 2023-09-17 22:05:31 UTC
2023-09-17 23:51:24,326 gpep517 INFO The backend produced /var/tmp/portage/net-wireless/aircrack-ng-1.7-r3/work/aircrack-ng-1.7-python3_11/wheel/airdrop_ng-1.1-py3-none-any.whl
 *   Installing airdrop_ng-1.1-py3-none-any.whl to /var/tmp/portage/net-wireless/aircrack-ng-1.7-r3/work/aircrack-ng-1.7-python3_11/install
gpep517 install-wheel --destdir=/var/tmp/portage/net-wireless/aircrack-ng-1.7-r3/work/aircrack-ng-1.7-python3_11/install --interpreter=/usr/bin/python3.11 --prefix=/usr --optimize=all /var/tmp/portage/net
-wireless/aircrack-ng-1.7-r3/work/aircrack-ng-1.7-python3_11/wheel/airdrop_ng-1.1-py3-none-any.whl   
2023-09-17 23:51:24,881 gpep517 INFO Installing /var/tmp/portage/net-wireless/aircrack-ng-1.7-r3/work/aircrack-ng-1.7-python3_11/wheel/airdrop_ng-1.1-py3-none-any.whl into /var/tmp/portage/net-wireless/ai
rcrack-ng-1.7-r3/work/aircrack-ng-1.7-python3_11/install                                             
Traceback (most recent call last):                                                                   
  File "/usr/lib/python-exec/python3.11/gpep517", line 4, in <module>            
    sys.exit(main())                                                                                 
             ^^^^^^                                                                                  
  File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 425, in main                                                                                                                           
    return func(args)                                                                                
           ^^^^^^^^^^                                                                                
  File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 258, in install_wheel                                                                                                                  
    install_wheel_impl(args, args.wheel)                                                             
  File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 253, in install_wheel_impl      
    install(source, dest, {})                                                                        
  File "/usr/lib/python3.11/site-packages/installer/_core.py", line 109, in install                                                                                                                         
    record = destination.write_file(                                                                                                                                                                        
             ^^^^^^^^^^^^^^^^^^^^^^^                                                                 
  File "/usr/lib/python3.11/site-packages/installer/destinations.py", line 203, in write_file        
    return self.write_to_fs(                                                                         
           ^^^^^^^^^^^^^^^^^                                                                         
  File "/usr/lib/python3.11/site-packages/installer/destinations.py", line 167, in write_to_fs       
    raise FileExistsError(message)                                                                                                                                                                          
FileExistsError: File already exists: /var/tmp/portage/net-wireless/aircrack-ng-1.7-r3/work/aircrack-ng-1.7-python3_11/install/usr/bin/airgraph-ng


Reproducible: Always

Steps to Reproduce:
1. USE="airdrop-ng airgraph-ng" emerge aircrack-ng

Actual Results:  
See description - conflict with 2nd install

Expected Results:  
aircrack-ng should be installed
Comment 1 Mike Gilbert gentoo-dev 2023-09-18 00:43:41 UTC
Please provide emerge --info in a comment and attach the full build log.
Comment 2 z4 2023-09-19 15:54:48 UTC
Created attachment 870974 [details]
emerge-info

emerge --info  # from build environment
Comment 3 z4 2023-09-19 15:56:18 UTC
Created attachment 870975 [details]
emerge -pqv information

emerge -pqv '=net-wireless/aircrack-ng-1.7-r3::gentoo'
Comment 4 z4 2023-09-19 15:58:01 UTC
Created attachment 870976 [details]
build.log for net-wireless/aircrack-ng:0 emerge

emerge net-wireless/aircrack-ng:0 log file
Comment 5 z4 2023-09-19 16:01:13 UTC
As I get the exact same thing, and so does at least one other person (https://forums.gentoo.org/viewtopic-t-1165153.html), I thought I'd submit the requested info.  Please see above attachments from me.  This bug should probably be considered "confirmed" now.
Comment 6 Stas 2023-09-24 12:09:11 UTC
I confirm, today I compiled it on two computers and there was an error everywhere during compilation!:
  File "/usr/lib/python3.11/site-packages/installer/destinations.py", line 167, in write_to_fs
    raise FileExistsError(message)
FileExistsError: File already exists: /var/tmp/portage/net-wireless/aircrack-ng-1.7-r3/work/aircrack-ng-1.7-python3_11/install/usr/bin/airgraph-ng
 * ERROR: net-wireless/aircrack-ng-1.7-r3::gentoo failed (compile phase):
 *   Wheel install failed
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 4378:  Called distutils-r1_src_compile
 *   environment, line 2174:  Called _distutils-r1_run_foreach_impl 'python_compile'
 *   environment, line  872:  Called python_foreach_impl 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 4000:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 3546:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 3544:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_compile'
 *   environment, line 1318:  Called distutils-r1_run_phase 'python_compile'
 *   environment, line 2158:  Called python_compile
 *   environment, line 3798:  Called distutils-r1_python_compile
 *   environment, line 1977:  Called distutils_pep517_install '/var/tmp/portage/net-wireless/aircrack-ng-1.7-r3/work/aircrack-ng-1.7-python3_11/install'
 *   environment, line 2517:  Called distutils_wheel_install '/var/tmp/portage/net-wireless/aircrack-ng-1.7-r3/work/aircrack-ng-1.7-python3_11/install' '/var/tmp/portage/net-wireless/aircrack-ng-1.7-r3/work/aircrack-ng-1.7-python3_11/wheel/airdrop_ng-1.1-py3-none-any.whl'
 *   environment, line 2533:  Called die
 * The specific snippet of code:
 *       "${cmd[@]}" || die "Wheel install failed";
 * 
 * If you need support, post the output of `emerge --info '=net-wireless/aircrack-ng-1.7-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-wireless/aircrack-ng-1.7-r3::gentoo'`.
 * The complete build log is located at '/var/log/portage/net-wireless:aircrack-ng-1.7-r3:20230924-115532.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/net-wireless/aircrack-ng-1.7-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-wireless/aircrack-ng-1.7-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/net-wireless/aircrack-ng-1.7-r3/work/aircrack-ng-1.7/scripts/airdrop-ng'
 * S: '/var/tmp/portage/net-wireless/aircrack-ng-1.7-r3/work/aircrack-ng-1.7'

>>> Failed to emerge net-wireless/aircrack-ng-1.7-r3, Log file:
Comment 7 z4 2023-09-29 14:41:46 UTC
A _very_ rudimentary work-around:

diff --git a/net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild b/net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild
index a92c8b354233..7f67f0dbda92 100644
--- a/net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild
+++ b/net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild
@@ -83,6 +83,9 @@ python_compile() {
                cd "${S}/scripts/airgraph-ng" || die
                distutils-r1_python_compile
        fi
+       for i in ${PYTHON_TARGETS} ; do
+               rm -rfv ${WORKDIR}/${P}-${i}/install
+       done
        if use airdrop-ng; then
                cd "${S}/scripts/airdrop-ng" || die
                distutils-r1_python_compile

Note that this is not intended as a work-around, though it gets the job done, but is rather intended for those fluent in python/setuptools/wheel interactions to show that the .../install area is shared by both airgraph-ng and airdrop-ng staging elements (my nomenclature, apologies for any confusion, don't know what else to call it).

The root cause is something around airdrop-ng is built/installed after airgraph-ng component, and the airdrop-ng was left behind at .../usr/bin/airgraph-ng etc.    When airdrop-ng python/wheel install is run, it attempts to re-install the airgraph-ng files, and since they're already there, it is a legitimate error.

The not-so-obvious issue from the error:

FileExistsError: File already exists: /var/tmp/portage/net-wireless/aircrack-ng-1.7-r3/work/aircrack-ng-1.7-python3_11/install/usr/bin/airgraph-ng

is that this is NOT from the airgraph-ng installation, but rather the airdrop-ng installation.  Which is why either/or airgraph-ng/airdrop-ng USE flags work alone, but not when both are set.

Maybe somebody else can make sense of this and provide a real solution.  I get that distutils-python is going away, but this setuptools/wheel thing seems to require its own career path.  Just when I was starting to like python...sheeeesh :-) .
Comment 8 z4 2023-09-29 14:52:52 UTC
Slight typo above, where it says

...and the airdrop-ng was left behind at...

should instead read as

...and the airgraph-ng was left behind at...
Comment 9 Rick Farina (Zero_Chaos) gentoo-dev 2023-11-09 23:19:18 UTC
*** Bug 914424 has been marked as a duplicate of this bug. ***
Comment 10 Rick Farina (Zero_Chaos) gentoo-dev 2023-11-09 23:46:17 UTC
@mgorny,

is this the point at which I need to break airdrop-ng and into their own ebuilds, or is there a way to fix this and keep them together?
Comment 11 z4 2023-11-10 00:06:40 UTC
(In reply to Rick Farina (Zero_Chaos) from comment #10)
> @mgorny,
> 
> is this the point at which I need to break airdrop-ng and into their own
> ebuilds, or is there a way to fix this and keep them together?

Hi Rick,

Did you try this patch?

diff --git a/net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild b/net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild
index a92c8b354233..7f67f0dbda92 100644
--- a/net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild
+++ b/net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild
@@ -83,6 +83,9 @@ python_compile() {
                cd "${S}/scripts/airgraph-ng" || die
                distutils-r1_python_compile
        fi
+       for i in ${PYTHON_TARGETS} ; do
+               rm -rfv ${WORKDIR}/${P}-${i}/install
+       done
        if use airdrop-ng; then
                cd "${S}/scripts/airdrop-ng" || die
                distutils-r1_python_compile

Comment #7 addresses your question exactly, before you even asked it.  Leaves me confused...
Comment 12 Larry the Git Cow gentoo-dev 2023-11-10 01:05:04 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1506cd688eed6f906a0ae392f3bf9cc14770eb1c

commit 1506cd688eed6f906a0ae392f3bf9cc14770eb1c
Author:     Rick Farina <zerochaos@gentoo.org>
AuthorDate: 2023-11-10 01:02:45 +0000
Commit:     Rick Farina <zerochaos@gentoo.org>
CommitDate: 2023-11-10 01:04:28 +0000

    net-wireless/aircrack-ng: fix bug #914367
    
    Signed-off-by: Rick Farina <zerochaos@gentoo.org>
    Closes: https://bugs.gentoo.org/914367
    Thanks to ztrawhcse for finding a sane looking work-around to keep this
    as one ebuild.

 net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild | 3 +++
 net-wireless/aircrack-ng/aircrack-ng-9999.ebuild   | 3 +++
 2 files changed, 6 insertions(+)