Re: [Rpm-maint] [rpm-software-management/rpm] Add --generate-subpackages to find_lang.sh (PR #2300)

2022-12-20 Thread Panu Matilainen
FWIW, I haven't looked at this in any great detail (find_lang.sh is something I 
try to steer clear of whenever I can) but seems okay to me. But no comments 
from other distros at all?

Let's try tagging a few people, including from #1276 which this AFAICS fixes. 
@sdp5, @lnussel, @Conan-Kudo,  @mlschroe (and feel free to add more)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2300#issuecomment-1358974340
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add --generate-subpackages to find_lang.sh (PR #2300)

2022-12-20 Thread Sundeep Anand
@juhp

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2300#issuecomment-1358981008
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix memory and file leak in some cases when running "rpm -i" (PR #2311)

2022-12-20 Thread Panu Matilainen
Merged #2311 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2311#event-8075996974
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix memory and file leak in some cases when running "rpm -i" (PR #2311)

2022-12-20 Thread Panu Matilainen
No need to split this one but for the future, the fsmCommit() change logically 
belongs to a separate PR as it is a separate case far away from the other two.

rpmInstall() is such a terrible mess that it's more in need of a tactical nuke 
than patching leaks, but as it's been in that state for decades, I'll continue 
plugging the leaks :laughing: 

Thanks for the patches!

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2311#issuecomment-1358982053
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Fix silent wait when missing input RPM package (PR #2326)

2022-12-20 Thread yangchenguang
Fix silent wait when missing input RPM package
Signed-off-by: yangchenguang 
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2326

-- Commit Summary --

  * Fix silent wait when missing input RPM package

-- File Changes --

M rpm2archive.c (4)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2326.patch
https://github.com/rpm-software-management/rpm/pull/2326.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2326
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Update list of deprecated / obsolete RPM tags (Issue #2327)

2022-12-20 Thread Daniel Alley
There are a number of RPM tags that are no longer useful and are essentially 
deprecated which have not yet been officially marked as such in documentation 
or in code comments.

Some examples:

* RPMTAG_FILESIGNATURELENGTH
* 32-bit size tags, once 
https://github.com/rpm-software-management/rpm/issues/864 goes through
* RPMSIGTAG_PGP, RPMSIGTAG_GPG, RPMSIGTAG_PGP5, RPMSIGTAG_MD5 if I am reading 
https://github.com/rpm-software-management/rpm/issues/1570 correctly

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2327
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Examine Compressed Headers (Issue #2220)

2022-12-20 Thread Daniel Alley
Here's a script I threw together in 30 minutes for getting a rough estimate of 
the usefulness

```Python
#!/usr/bin/env python

import os
import sys
import createrepo_c as cr

import lz4.frame
import zstd

results = {}

with os.scandir(sys.argv[1]) as entries:
for entry in entries:
if not entry.is_file() or not entry.path.endswith(".rpm"):
continue

pkg = cr.package_from_rpm(
entry.path,
location_href=str(entry.path),
checksum_type=cr.SHA256,
)
header_size_bytes = pkg.rpm_header_end - pkg.rpm_header_start
with open(entry.path, "rb") as f:
f.seek(pkg.rpm_header_start)
header = f.read(header_size_bytes)

zstd_header = zstd.ZSTD_compress(header)
lz4_header = lz4.frame.compress(header)

results[str(entry.path)] = {
"header_size": header_size_bytes,
"package_size": pkg.size_package,
"archive_size": pkg.size_archive,
"header_size_zstd": len(zstd_header),
"header_size_lz4": len(lz4_header),
}

total_size_headers = 0
total_size_packages = 0
total_size_archives = 0
total_size_lz4 = 0
total_size_zstd = 0

print("Results for {} packages".format(len(results)))

for package, data in results.items():
total_size_headers += data["header_size"]
total_size_packages += data["package_size"]
total_size_archives += data["archive_size"]
total_size_lz4 += data["header_size_lz4"]
total_size_zstd += data["header_size_zstd"]

print("Average header size as proportion of package total: 
{:.2f}%".format(total_size_headers / total_size_packages * 100))
print("Average header savings for LZ4 compressed headers: 
{:.2f}%".format(total_size_lz4 / total_size_packages * 100))
print("Average header savings for ZSTD compressed headers: 
{:.2f}%".format(total_size_zstd / total_size_packages * 100))

```

Run it like so 

```
[dalley@thinkpad devel]$ python compressed_header_test.py ~/devel/repos/fixture/
Results for 35 packages
Average header size as proportion of package total: 64.90%
Average header savings for LZ4 compressed headers: 46.56%
Average header savings for ZSTD compressed headers: 33.52%
```

(these sample results ought to be ignored entirely, the packages are 
effectively completely empty hello-world type stuff, not even remotely 
real-world)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2220#issuecomment-1360910971
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint