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

Add zst compression type support #38

Merged
merged 1 commit into from
Jul 5, 2024
Merged

Conversation

agraul
Copy link
Member

@agraul agraul commented Jul 4, 2024

Uses github.com/klauspost/compress/zstd to handle the decompression since there is no zstandard support in Go's standard library.

Fixes #36

Uses github.com/klauspost/compress/zstd to handle the decompression
since there is no zstandard support in Go's standard library.

Fixes #36
@agraul agraul requested a review from nodeg July 4, 2024 13:13
@nodeg
Copy link
Member

nodeg commented Jul 5, 2024

I already built the binary (with static linking due to being on Tumbleweed and running it on SLE15 SP5) with

go build -tags netgo,osusergo

executing this new binary with the new SL Micro 6.0 repo, works fine and the packages get downloaded:

/etc/dom.yaml:

storage:
  type: file
  path: /srv/mirror

scc:
  username: xxxxxx
  password: xxxxx
  repo_names:
    # SLE Micro
    - SL-Micro-6.0-Pool
    - SUSE-Manager-Tools-For-SL-Micro-6.0
    - SUSE-Manager-Tools-Beta-For-SL-Micro-6.0
  archs: [x86_64]
minima-mirror-ci-bv:~ # cat /usr/local/bin/dom.sh
#! /bin/bash

/usr/bin/date >> /var/log/dom.log
echo '---------------------------------------------------------' >> /var/log/dom.log
(/usr/local/bin/utils/minima_dom sync -c /etc/dom.yaml 2>&1) >> /var/log/dom.log
echo >> /var/log/dom.log

dom.log:

2024/07/05 08:31:04 Processing repo: https://updates.suse.com/SUSE/Products/SL-Micro/6.0/x86_64/product/?XXXXXXXXXXXXX
2024/07/05 08:31:04 Downloading repomd.xml...
2024/07/05 08:31:04 Downloading repomd.xml.asc...
2024/07/05 08:31:04 Downloading repomd.xml.key...
2024/07/05 08:31:04 repodata/ceac29442faf83503837c33974be82a0efb80f65da606884a5dc583afa2afd39e98c4f702415b62fb641c96e842bc54fe9560a080ff4e1afd1f58ac79833f140-primary.xml.zst
2024/07/05 08:31:04 ...recycling
2024/07/05 08:31:04 repodata/11cc78626afb6e471b0b11ca6f65eac7ba41a86976c7260eefbc8d93a7f368613b1dc34324815459f9a64564003e1c85c2fac04ad6d726be20ff645f11675959-filelists.xml.zst
2024/07/05 08:31:04 ...recycling
2024/07/05 08:31:04 repodata/53cb9077e04d8ba6c628bbc8224b2c762b904a385a1169efa0b541737ef808621c6050144ad808c641fd135d668d4262ff9b6aaf0b370eef4bc8970b46eb555b-other.xml.zst
2024/07/05 08:31:04 ...recycling
2024/07/05 08:31:04 repodata/91cb3f3af07d95002d5b3367b9c969ec640a9876fa06d8ea100193117ba22867c8d6b2c04411ae17f9aebe191eb9a5ddee8a58ef7b5718c21e56fd73d5e0d179-license-SL-Micro.tar.zst
2024/07/05 08:31:04 ...recycling
2024/07/05 08:31:04 repodata/79d62f9c4cae97a69fbb9a9a148733dedd65c16f8e31dae6c796cca1fac7d2698487520646770982df6d931cd2faf4cb3f9df68bdfdf7605af036f920d707f10-susedata.zh_CN.xml.zst
2024/07/05 08:31:04 ...recycling
2024/07/05 08:31:04 Downloading 1123 packages...
2024/07/05 08:31:04 Downloading (1/1123) Mesa-23.3.4-7.3.x86_64.rpm...
2024/07/05 08:31:04 Downloading (2/1123) Mesa-dri-23.3.4-7.3.x86_64.rpm...
2024/07/05 08:31:05 Downloading (3/1123) Mesa-gallium-23.3.4-7.3.x86_64.rpm...
2024/07/05 08:31:05 Downloading (4/1123) Mesa-libEGL1-23.3.4-7.3.x86_64.rpm...
2024/07/05 08:31:05 Downloading (5/1123) Mesa-libGL1-23.3.4-7.3.x86_64.rpm...
2024/07/05 08:31:05 Downloading (6/1123) Mesa-libglapi0-23.3.4-7.3.x86_64.rpm...
2024/07/05 08:31:05 Downloading (7/1123) ModemManager-1.20.6-5.12.x86_64.rpm...
(...)

@agraul agraul merged commit c3ada41 into master Jul 5, 2024
1 check passed
@agraul agraul deleted the add-zstd-compression-support branch July 5, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for .zst
2 participants