Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows - do we need cygpath anymore? #12063

Closed
wants to merge 2 commits into from
Closed

Conversation

jasonish
Copy link
Member

This builds locally for me, and in GitHub CI, where is cygpath really needed?

Recent Windows builds appear to not need the Rust directory expanded
to a Windows style path, so just use @abs_top_srcdir@ and
@abs_top_builddir@ directly.

Removed the 2 build lines depending on having cygpath or now.
Doesn't appear to be needed.
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.42%. Comparing base (3a7eef8) to head (8cca944).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12063      +/-   ##
==========================================
- Coverage   83.42%   83.42%   -0.01%     
==========================================
  Files         910      910              
  Lines      257642   257642              
==========================================
- Hits       214949   214934      -15     
- Misses      42693    42708      +15     
Flag Coverage Δ
fuzzcorpus 61.60% <ø> (-0.05%) ⬇️
livemode 19.41% <ø> (-0.01%) ⬇️
pcap 44.46% <ø> (-0.03%) ⬇️
suricata-verify 62.77% <ø> (+0.01%) ⬆️
unittests 59.37% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@victorjulien
Copy link
Member

Don't know why, but my setup still requires it

make[1]: Entering directory '/c/Gitlab-Runner/builds/hNRUpEPe/1/inliniac/suricata-ci/suricata/rust'
mkdir -p /c/Gitlab-Runner/builds/hNRUpEPe/1/inliniac/suricata-ci/suricata/rust/gen
cd /c/Gitlab-Runner/builds/hNRUpEPe/1/inliniac/suricata-ci/suricata/rust && \
	 CARGO_HOME="/home/SYSTEM/.cargo" \
	CARGO_TARGET_DIR="/c/Gitlab-Runner/builds/hNRUpEPe/1/inliniac/suricata-ci/suricata/rust/target" \
	SURICATA_LUA_SYS_HEADER_DST="/c/Gitlab-Runner/builds/hNRUpEPe/1/inliniac/suricata-ci/suricata/rust/gen" \
	/mingw64/bin/cargo build --release  \
		--features "ja3 ja4  " 
error: failed to get `aes` as a dependency of package `suricata v8.0.0-dev (C:\Gitlab-Runner\builds\hNRUpEPe\1\inliniac\suricata-ci\suricata\rust)`
Caused by:
  failed to load source for dependency `aes`
Caused by:
  Unable to update registry `crates-io`
Caused by:
  failed to update replaced source registry `crates-io`
Caused by:
  failed to read root of directory source: C:\c\Gitlab-Runner\builds\hNRUpEPe\1\inliniac\suricata-ci\suricata\rust\vendor
Caused by:
  The system cannot find the path specified. (os error 3)
make[1]: *** [Makefile:540: all-local] Error 101
make[1]: Leaving directory '/c/Gitlab-Runner/builds/hNRUpEPe/1/inliniac/suricata-ci/suricata/rust'
make: *** [Makefile:503: all-recursive] Error 1

@victorjulien
Copy link
Member

My runners run as follows:

win10mingw64:
  script:
    - cd %CI_PROJECT_DIR%
    - set Path=c:\msys64\mingw64\bin;c:\msys64\usr\bin;c:\msys64\npcap-sdk\x86_64;%Path%
    - set PKG_CONFIG_PATH=/c/msys64/mingw64/lib;/c/msys64/mingw64/share;
    - bash getsv.sh
    - rd suricata /s /q
    - md suricata
    - tar xzvf suricata.tar.gz -C suricata --strip-components=1
    - cd suricata
    - bash configure --with-libpcap-libraries=/c/msys64/npcap-sdk/Lib/x64 --with-libpcap-includes=/c/msys64/npcap-sdk/Include --disable-shared --enable-gccprotect
    - make -j 8
    - ldd src\suricata.exe
    - src\suricata --build-info
    - jq --version
    - python3 ..\suricata-verify\run.py -q
  artifacts:
    when: on_failure
    paths:
      - 'suricata-verify\tests\*\output\eve.json'
      - 'suricata-verify\tests\*\*\output\eve.json'
  tags:
    - windows
win10mingw64ut:
  script:
    - cd %CI_PROJECT_DIR%
    - set Path=c:\msys64\mingw64\bin;c:\msys64\usr\bin;c:\msys64\npcap-sdk\x86_64;%Path%
    - set PKG_CONFIG_PATH=/c/msys64/mingw64/lib;/c/msys64/mingw64/share;
    - rd suricata /s /q
    - md suricata
    - tar xzvf suricata.tar.gz -C suricata --strip-components=1
    - cd suricata
    - bash configure --with-libpcap-libraries=/c/msys64/npcap-sdk/Lib/x64 --with-libpcap-includes=/c/msys64/npcap-sdk/Include --disable-shared --enable-unittests --enable-gccprotect
    - make -j 8
    - src\suricata --build-info
    - src\suricata -u -l %TEMP% --fatal-unittests
  tags:
    - windows

@jasonish
Copy link
Member Author

Interesting, really curious how my setup, which uses the GitHub CI stuff as a reference, and GitHub CI differs from your setup. I use Windows 11, GitHub uses Microsoft Windows Server 2022, maybe its Windows 10?

@victorjulien
Copy link
Member

I think my shell is just whatever MS cmd.exe is. IIRC github-ci uses a msys shell of sorts? In my output and commands you see a weird mix of unix like paths /c/... and windows like paths c:\....

@victorjulien
Copy link
Member

I guess ideally you'd be able to use only the windows path notation, but at the time I couldn't get it to work. I won't be able to dig into this anytime soon either.

@jasonish jasonish closed this Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants